Skip to content

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

Description

@hboon

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).

Activity

  1. hboon commented on Jul 30, 2020

    @hboon
    MemberAuthor

    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.
  2. overseers-desk commented on Jul 30, 2020

    @overseers-desk

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions