FranklinPay-iOS
FranklinPay-iOS copied to clipboard
Feature: Pending transactions
Current behavior: Now you can only get past transactions and show them
Expected behavior: Needs to get pending transactions and show them
Solution:
You can use txpool
, made by @currybab in his PR
For Franklin use Matter Plasma Ignis API to get pending transactions.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 100.0 DAI (100.0 USD @ $1.0/DAI) attached to it.
- If you would like to work on this issue you can 'start work' on the Gitcoin Issue Details page.
- Want to chip in? Add your own contribution here.
- Questions? Checkout Gitcoin Help or the Gitcoin Slack
- $45,803.38 more funded OSS Work available on the Gitcoin Issue Explorer
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 1 week, 2 days ago. Please review their action plans below:
1) santteegt has been approved to start work.
I´ll love to work on this as a first good issue for using a plasma impl.
Learn more on the Gitcoin Issue Details page.
@santteegt hi! Great that you want to help with this. Ready to answer your questions
Hi @BaldyAsh,
I've already setup the project dev environment. I was doing some tests by sending small Eth transactions on the Rinkeby testnet. Digging into the code, seems that this feature has to be implemented under the uploadTransactions()
function in the TransactionHistory
view controller. Now, I'm going to do some tests using the txPool
instance available under wallet.web3Instance
. In case I found some issues, I'll reach you :)
@santteegt Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
- [x] reminder (3 days)
- [ ] escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Hi @BaldyAsh,
After doing some test trying to get the tx pool for sent ETH trxs on the Rinkeby testnet, I was always getting nil
. Looking at the documentation seems that it does not work with Infura providers. Do I need to setup a local node to implement this, as mentioned in the reference PR?
@santteegt Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
- [x] reminder (3 days)
- [ ] escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@santteegt you are right. Think I need to implement subscriptions in web3swift myself and then this issue can be solved
Hi @BaldyAsh,
Okay, so should I wait until this feature is implemented under web3swift? I was thinking of implementing a manual tx pool by maintaining a sent tx list in global state and then verify if each of them was confirmed using the getTransactionReceipt
method, but the downside is that this will be hardcoded in the wallet project.
On the other hand, in order to send transactions through the Plasma chain, how can I get some Franklin tokens?
@santteegt think you may implement just UI and make some mocks for TXs loading. You can write mocks assuming that the pending TXs interface will be similar to the one that is in web3.js. I think this should be enough, I'll finish web3swift part and the task will be completed. For plasma - there is no need for separated pending TXs loading, and besides I have not implemented TXs in Swift yet. There is used a curve for signing TXs, that is not yet implemented in Swift. So currently I'm working on bridging some rust libs functionality with iOS.
@santteegt started work in https://github.com/matter-labs/web3swift/pull/144
@santteegt Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
- [x] reminder (3 days)
- [ ] escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Hi @BaldyAsh ,
I was considering using the current UI features to show pending transactions (Bob trx on screen image) under the All
tab
I was looking to your progress in the websockets feature and seems that you almost finish it. Let me know when this feature is fully available on web3swift :)
@santteegt hi, yes I've almost finished. There was some pod issue, hope it will not appear in new release. Or I'll integrate web3swift in Franklin as framework and it will work. Regarding pending txs - yes they should be presented in that way ;)
Hi @BaldyAsh,
I just looked that you made a new release for the web3swift library. I've proceeded to update the web3swift pod version to 2.1.3
and also changed the Swift language to version 5, but I'm getting some compiling errors on the new code that implements the support for web sockets, such as Value of optional type '[String : Any]?' must be unwrapped to refer to member 'subscript' of wrapped base type '[String : Any]'
at line 171 of Web3+InfuraProviders.swift
:
let result = dictionary["result"] as? String {
// setting filter id
filterID = result
}
Not sure if I'm missing something when upgrading the pods.
@santteegt hi, I've updated Franklin myself and haven't faced this error. Could you provide me a link to your project?
@santteegt You can use updated Franklin version from this branch https://github.com/matter-labs/FranklinPay-iOS/tree/w3s2.1.3update
Cool! Thanks @BaldyAsh. I'll use that branch
Hi @BaldyAsh,
I am working in the following approach for fulfilling this feature. What do you think?
- Store all sent transactions on the
ETHTransactionModel
withisPending=true
. - When the
TransactionHistory
view refreshes:
- fetch these records
- compare txhashes with confirmed tx list
- update the record status on those that were already confirmed
- trxs that are still pending are appended to the view list
@santteegt hi, think this should work, don't forget about failed txs :)
Hi @BaldyAsh,
I just created a WIP PR for you to review my approach. It is working but sometimes while the pending transaction is confirmed through web3, the tx does not appear until Etherscan index that transaction a 1-2 seconds later.
@santteegt Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
- [x] reminder (3 days)
- [ ] escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 100.0 DAI (100.0 USD @ $1.0/DAI) has been submitted by:
@ceresstation please take a look at the submitted work:
- PR by @santteegt
- Learn more on the Gitcoin Issue Details page
- Want to chip in? Add your own contribution here.
- Questions? Checkout Gitcoin Help or the Gitcoin Slack
- $97,444.25 more funded OSS Work available on the Gitcoin Issue Explorer
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
The funding of 100.0 DAI (100.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @santteegt.
- Learn more on the Gitcoin Issue Details page
- Questions? Checkout Gitcoin Help or the Gitcoin Slack
- $97,941.27 more funded OSS Work available on the Gitcoin Issue Explorer