Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling a token contract which has been migrated/replaced (like DAI->SAI, or TUSD) #127

Open
hboon opened this issue Jun 1, 2020 · 2 comments
Assignees

Comments

@hboon
Copy link
Member

hboon commented Jun 1, 2020

Tomek reports that he sees 2 TUSD tokens with the same balance in his wallet. This is happening because they have migrated their contract:

https://etherscan.io/address/0x8dd5fbCe2F6a956C3022bA3663759011Dd51e73E
https://etherscan.io/address/0x0000000000085d4780B73119b644AE5ecd22b376

This is just a placeholder so we don't forget about the problem. Some design is needed.

eg:

We can have a simple fix like storing a list of such contract pairs where 1 is replaced by the other and display the old version slightly differently ("legacy" or a bit of generic explanation text). We can't just hide the tokens automatically since the user might want/need to migrate manually (like DAI/SAI).

@hboon
Copy link
Member Author

hboon commented Jul 30, 2020

Weiwu commented:

  1. have 1 tokenscript that has 2 contracts in it, one is used for displaying balance and the other used to get an attribute called old_balance.
  2. if old_balance is greater than a certain value, make a selection called "migration-needed", which enables the 'migration' action.
  3. make the item view and token view both have a status icon or flash or in red colour if old_balance is greater than a certain value.

@SmartLayer SmartLayer self-assigned this Jul 30, 2020
@SmartLayer
Copy link

I should provide an example implementation on how to handle migration.

@SmartLayer SmartLayer transferred this issue from AlphaWallet/alpha-wallet-ios Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants