alpha-wallet-ios
alpha-wallet-ios copied to clipboard
"Impossible To Build Configuration"
Refer https://github.com/AlphaWallet/alpha-wallet-ios/issues/4888#issuecomment-1175351309
@Hoanib would you help to describe how to reproduce this?
Blue Sky NFT token (Polygon)
Contract address: 0x612ee4BfD2EE2EAA7ef44120543C78AB4Bd16635
Wallet: 0x32024F224b493Da02B2b9B985ee2fEe37Eed966b
Owner wallet managed, some how, to add manually the contract address of the token. And the token is displayed in his wallet as the screenshots show. (I couldn't add it, even using his wallet as Watch Wallet)




Not sure if it's still reproducible
will check
yes this is still a case, we wrongly update imported token balance, mean create a token with incorrect balance value, and user have some time to open token screen and go throught send process.
@hboon what if we remove creating a ercToken AddOrUpdateTokenAction case add(ercToken: ErcToken, shouldUpdateBalance: Bool) with its balance, as balance at this point can be incorrect. and will relay on balance fetcher, to get right balance value?
what if we remove creating a ercToken AddOrUpdateTokenAction case add(ercToken: ErcToken, shouldUpdateBalance: Bool) with its balance, as balance at this point can be incorrect. and will relay on balance fetcher, to get right balance value?
Is this correct? —
- User manually imports token
- We auto detect token type correctly (so ERC-721 here) and add the wrong balance; do we add say 2, or do we have an invalid JSON representing 1, eg.
[{}, {}]? - User tries to send the token before the balance is updated
If so, where in the code does it throw TransactionConfiguratorError.impossibleToBuildConfiguration and why does the code do it?
And do you mean to just set it to 0/[] instead in step (2)?
Alternatively, what if we have a way to check/denote that the balance for each token is not ready yet? — I don't know how useful is this or if it just complicates things. Maybe a flag or switch the balance to an enum
add pr with checking right token balance for each token type, also updated check is zero balance function. now should be good
If so, where in the code does it throw TransactionConfiguratorError.impossibleToBuildConfiguration and why does the code do it?
i suppose that its here https://github.com/AlphaWallet/alpha-wallet-ios/blob/cfd411b1d9f46f9450207fed10499ca95fc8127f/AlphaWallet/Transfer/Collectibles/Coordinators/TransferCollectiblesCoordinator.swift#L113