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

wallet addresses are not being updated when restoring previous wallets #1831

Closed
kjozwiak opened this issue Oct 25, 2018 · 5 comments · Fixed by brave/brave-core#734
Closed

Comments

@kjozwiak
Copy link
Member

Description

When restoring wallets, the addresses are not being updated to reflect the restored wallet, example:

Original wallet when enabling rewards:

"paymentId":"0dd3d2e5-452f-4055-8206-8faae8f387f7",
"addressBAT":"0x526620Aa18B011e2314a05A44068eF63121E9bC4",
"addressBTC":"1DRVEcbbR3zohQg4o6kP6ewNruzchWyvY4",
"addressCARD_ID":"57f211b9-eca8-4e3c-b695-fb60fe793503",
"addressETH":"0x526620Aa18B011e2314a05A44068eF63121E9bC4",
"addressLTC":"LbMdhD3umBAxuQaCujxn7Q9yTnwcRvzjQR"

After restoring another wallet:

"paymentId":"eb42caf4-17dd-41d7-80be-f868d98bd513",
"addressBAT":"0x526620Aa18B011e2314a05A44068eF63121E9bC4",
"addressBTC":"1DRVEcbbR3zohQg4o6kP6ewNruzchWyvY4",
"addressCARD_ID":"57f211b9-eca8-4e3c-b695-fb60fe793503",
"addressETH":"0x526620Aa18B011e2314a05A44068eF63121E9bC4",
"addressLTC":"LbMdhD3umBAxuQaCujxn7Q9yTnwcRvzjQR"

In the above example, I restored a wallet and ended up sending funds to 1DRVEcbbR3zohQg4o6kP6ewNruzchWyvY4 instead of 0x526620Aa18B011e2314a05A44068eF63121E9bC4. Because I never backed up the previous wallet, I've lost all my funds.

Steps to Reproduce

  1. launch 0.56.6 Chromium: 70.0.3538.67 and enable rewards via brave://rewards
  2. once enabled, open ledger_state and note paymentId, addressBAT, addressBTC, addressCARD_ID, addressETH and addressLTC
  3. restore a previously created wallet via Settings -> Restore your Wallet
  4. once restored, open ledger_state

You'll notice that paymentId has changed but the other addresses haven't been updated.

Actual result:

See example above. The addresses are not being correctly updated when restoring wallets.

Expected result:

Addresses should be updated and reflect the correct addresses associated with the restored wallet.

Reproduces how often:

100% reproducible using the above STR.

Brave version (brave://version info)

Brave 0.56.6 Chromium: 70.0.3538.67 (Official Build) beta(64-bit)
Revision 9ab0cfab84ded083718d3a4ff830726efd38869f-refs/branch-heads/3538@{#1002}
OS Mac OS X

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds?

Yes, reproducible on all the channels. Reproduced using:

Brave 0.57.2 Chromium: 70.0.3538.67 (Official Build) dev (64-bit)
Revision 9ab0cfab84ded083718d3a4ff830726efd38869f-refs/branch-heads/3538@{#1002}
OS Mac OS X
Brave 0.56.6 Chromium: 70.0.3538.67 (Official Build) beta(64-bit)
Revision 9ab0cfab84ded083718d3a4ff830726efd38869f-refs/branch-heads/3538@{#1002}
OS Mac OS X
Brave 0.55.20 Chromium: 70.0.3538.67 (Official Build) (64-bit)
Revision 9ab0cfab84ded083718d3a4ff830726efd38869f-refs/branch-heads/3538@{#1002}
OS Mac OS X
@NejcZdovc
Copy link
Contributor

fixed brave/brave-core#734

@bsclifton bsclifton added the priority/P1 A very extremely bad problem. We might push a hotfix for it. label Oct 26, 2018
@srirambv
Copy link
Contributor

srirambv commented Oct 29, 2018

Verification Passed on

Brave 0.55.21 Chromium: 70.0.3538.77 (Official Build) (64-bit)
Revision 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS Linux
Before recovery
"paymentId":"ae556a7d-ffc3-46c8-9617-3d0beef9d622",
"addressBAT":"0x0A07bBc48521Ec8FF4495cac828e5ABB56D35742",
"addressBTC":"1GnEXHV3qcgoRPsfMU1KdNKUu2Kgdq9Jsu",
"addressCARD_ID":"f8436a01-5fd3-4c8d-befb-7070145eb324",
"addressETH":"0x0A07bBc48521Ec8FF4495cac828e5ABB56D35742",
"addressLTC":"Lb1Zs6yMT5xZ6GWhUzCCHkrUvjANuehuTL",
"personaId":"a79fc00c-4373-4097-a5d2-5cbcf1970956",

After recovery
paymentId":"9afa6d3c-bf39-4d63-8577-271a24a99839",
"addressBAT":"0x5f1492bf30f77385D46FC27A6b8C59Bc74ABf0fC",
"addressBTC":"14aHV2ajJYLHqGNt6EEyA14LjxywDgL6mB",
"addressCARD_ID":"3401961f-78ae-4a17-8666-745fd2a2301e",
"addressETH":"0x5f1492bf30f77385D46FC27A6b8C59Bc74ABf0fC",
"addressLTC":"LM9CUuHeGjCFKcGByQDdqRLvh44H3nUAzB",
"personaId":"a79fc00c-4373-4097-a5d2-5cbcf1970956",

Verification Passed on

Brave 0.55.21 Chromium: 70.0.3538.77 (Official Build) (64-bit)
Revision 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS Windows

Wallet Address before recovery:

“paymentId":"2b62fb78-5a7e-4372-8a74-30af34a81f24",
"addressBAT":"0x888C1a8E0B5bC784e733215E236b46155fCabB4B",
"addressBTC":"12ZaXw54mFeneAPRKUiHxBrCidC7NwuM1e",
"addressCARD_ID":"b185c8ce-1756-4ae2-a211-ce8b78d4fb3c",
"addressETH":"0x888C1a8E0B5bC784e733215E236b46155fCabB4B",
"addressLTC":"LNg6AeM2PUbrjQ5rSkN3saDh7bfmewQ5rF",
"personaId":"742d39ee-8d06-431d-897c-d73f55b6012f",

Wallet Address After recovery:

“paymentId":"983e6ecf-41e1-49e9-ae89-fce325616524",
"addressBAT":"0x09c9E9E28c1238184634C32fc2dADf401d8FB255",
"addressBTC":"135oBbuC1eXwe5MUX1rhdcahf58nqFQLSN",
"addressCARD_ID":"ac12e8db-473b-4315-ac2a-60c721902e12",
"addressETH":"0x09c9E9E28c1238184634C32fc2dADf401d8FB255",
"addressLTC":"LZFQhEXDoUo2Xpss1qgPev5ciS4TPK3rJd",
"personaId":"742d39ee-8d06-431d-897c-d73f55b6012f",

@kjozwiak
Copy link
Member Author

Clearing current labels, we should try again once we get the new RC builds just to double check and make sure this is still resolved and working as expected.

@srirambv
Copy link
Contributor

srirambv commented Oct 30, 2018

Verification passed on

Brave 0.55.22 Chromium: 70.0.3538.77 (Official Build) (64-bit)
Revision 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS Linux
  • Verified Wallet address is updated after recovery
  • Verified recovered wallet retains all the funds that were there in the wallet
  • Verified QR code scan shows the correct wallet address
Before recovery
"paymentId":"eb0dc24d-fa14-4c56-95cb-feea1a0628bb",
"addressBAT":"0xb753c879a412457B80677Ed39E4FF9dbEf361318",
"addressBTC":"1jMXpEz5L5qnuQpbEwvmDvnQXa6E9qq2u",
"addressCARD_ID":"314f4cba-ddc4-4a9d-935a-05f3cecf1a6c",
"addressETH":"0xb753c879a412457B80677Ed39E4FF9dbEf361318",
"addressLTC":"LKn9iiNZtQ6D3xfoWHV8dNjQAwCy5S3iRp",
"personaId":"c3c49cd3-6169-4d92-a0b3-9114ace595ac"

After recovery
"paymentId":"15d6298a-312f-4cd0-b090-d58f2403084e",
"addressBAT":"0x3c11c968C559CEfdA1Bac909bcB1eeC938784618",
"addressBTC":"1Gj9ZWqsWubQSKT8pktaoZafCNsNoHAa94",
"addressCARD_ID":"3e8beedd-4aaf-46db-9af9-b9ec2a5aca9d",
"addressETH":"0x3c11c968C559CEfdA1Bac909bcB1eeC938784618",
"addressLTC":"Ldb544DzK53YzvbpFondq8gmnGTNZevE2A",
"personaId":"c3c49cd3-6169-4d92-a0b3-9114ace595ac"

Verification Passed on

Brave 0.55.22 Chromium: 70.0.3538.77 (Official Build) (64-bit)
Revision 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS Windows
  • Verified Wallet address is updated after recovery
  • Verified recovered wallet retains all the funds that were there in the wallet
  • Verified QR code scan shows the correct wallet address

Wallet Address before recovery:
"paymentId":"e065700d-917c-4793-a9d8-d82b7c0801ba",
"addressBAT":"0xd9f121fA7F5E7533D686eDA3566Af7b3fc274d1E",
"addressBTC":"12aKm6gE2UD57G6RR7t6sEaLWoVsfMSu8m",
"addressCARD_ID":"12c81b45-a5a9-40ea-9c31-ace6c62135ac",
"addressETH":"0xd9f121fA7F5E7533D686eDA3566Af7b3fc274d1E",
"addressLTC":"LPuWy9GbsX6KRkzQZygPNa8ZWMdYC9HCCK",
"personaId":"d83e318b-aa0a-4508-bbeb-583b3e34e02b",

Wallet Address After recovery:
"paymentId":"983e6ecf-41e1-49e9-ae89-fce325616524",
"addressBAT":"0x09c9E9E28c1238184634C32fc2dADf401d8FB255",
"addressBTC":"135oBbuC1eXwe5MUX1rhdcahf58nqFQLSN",
"addressCARD_ID":"ac12e8db-473b-4315-ac2a-60c721902e12",
"addressETH":"0x09c9E9E28c1238184634C32fc2dADf401d8FB255",
"addressLTC":"LZFQhEXDoUo2Xpss1qgPev5ciS4TPK3rJd",
"personaId":"d83e318b-aa0a-4508-bbeb-583b3e34e02b",

Verification passed on Windows 7 x64

Brave 0.55.22 Chromium: 70.0.3538.77 (Official Build) (64-bit)
Revision 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS Windows 7 x64
  • Verified Wallet address is updated after recovery
  • Verified recovered wallet retains all the funds that were there in the wallet
  • Verified QR code scan shows the correct wallet address

Wallet Address before recovery:

"paymentId": "bf67a7d0-50d6-487e-84d6-5adb1d0e21dc",
"addressBAT": "0xd262a54dab45b7879fb0188eA1E6AD5a9b91D75E",
"addressBTC": "1LGa24wdrePnHPcsW5hSoFxD3w2TGikiSn",
"addressCARD_ID": "4f5b8b14-812c-4372-8dd5-b5435120f262",
"addressETH": "0xd262a54dab45b7879fb0188eA1E6AD5a9b91D75E",
"addressLTC": "LWb5A3gvcqNxNuyePF8pxRhRh7uu2GuWf2",
"keyInfoSeed": "RYCmxEegv09MQYwmfrMI8PNph3yq7UklHT10o/yxTs8="

Wallet Address After recovery:

"paymentId": "9f2816be-4ad2-492c-a451-a0994446ad21",
"addressBAT": "0xb97241F90C3A648c4bd25D56Ae87c5aB82647306",
"addressBTC": "1AtXbPVgA7d4ngpFMycD784zdpFhkoZpjv",
"addressCARD_ID": "58ac7dfa-f9e6-4c7f-af8a-f4c2071ca7bd",
"addressETH": "0xb97241F90C3A648c4bd25D56Ae87c5aB82647306",
"addressLTC": "LUNVSgfA9D2gJpeqqi7NFmTtxak4btqYNS",
"keyInfoSeed": "4vWcuF94rmHWv3cDYhyULn4GL7xftT6D47VKGmb9bGU="

@kjozwiak
Copy link
Member Author

Went through verification using the following build under macOS 10.13.6 x64 - PASSED

Brave 0.55.22 Chromium: 70.0.3538.77 (Official Build) (64-bit)
Revision 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS Mac OS X

Addresses generated when enabling brave://rewards:

"paymentId":"9ee67136-7a98-41b8-b678-bbb238669f7e",
"addressBAT":"0x76A820Db7c19F526db1Ab9AA7f3A3d0FA9c25e0b",
"addressBTC":"1Cspq7HRVgiEZxsTYSdmDJLfYEp62FwEcq",
"addressCARD_ID":"d63c3bbf-69cd-410c-bee0-071b2d0c8290",
"addressETH":"0x76A820Db7c19F526db1Ab9AA7f3A3d0FA9c25e0b",
"addressLTC":"LMY119mJG7rNuuTKMcgdkQ4q1K7uj9AJSK"
  • enabled brave://rewards and ensured that the addresses being listed under ledger_state are the same addresses being listed under in the Rewards UI
  • scanned each QR code and ensured that the addresses are matching
  • relaunched Brave several times and ensured that the addresses under ledger_state and brave://rewards haven't changed
  • sent 25 BAT from an Uphold LTC wallet to the LTC address Brave generated and ensured that the funds were received and displayed under brave://rewards
  • sent 10 BAT from an Uphold BTC wallet to the BTC address Brave generated and ensured that the funds were received and displayed under brave://rewards
  • sent 5 BAT from an Uphold ETH wallet to the ETH address Brave generated and ensured that the funds were received and displayed under brave://rewards
  • sent 5 BAT from an Uphold BAT wallet to the BAT address Brave generated and ensured that the funds were received and displayed under brave://rewards

Backed up the above wallet and went through the following cases once I restored a new wallet:

"paymentId":"9ad2aaac-f7c9-4000-af58-86dc608f3dd5",
"addressBAT":"0x42D97CDE05cc8A0A16E0F4728DEf5E2E565E5Dcb",
"addressBTC":"19VksjpRQMnqk6G96PWrdwozpuPvNBsSCo",
"addressCARD_ID":"1eaae0d7-c9c8-4d06-ad5a-92555d41fa48",
"addressETH":"0x42D97CDE05cc8A0A16E0F4728DEf5E2E565E5Dcb",
"addressLTC":"Lc9nF4pBjcprTkkCMN3zqJPEHja6EVyWsn"
  • ensured that the previous addresses have been replaced with the new restored wallet
  • scanned each QR code and ensured that the addresses are matching
  • relaunched Brave several times and ensured that the addresses under ledger_state and brave://rewards haven't changed
  • sent 5 BAT from an Uphold LTC wallet to the LTC address Brave generated and ensured that the funds were received and displayed under brave://rewards
  • sent 5 BAT from an Uphold BTC wallet to the BTC address Brave generated and ensured that the funds were received and displayed under brave://rewards
  • sent 5 BAT from an Uphold ETH wallet to the ETH address Brave generated and ensured that the funds were received and displayed under brave://rewards
  • sent 5 BAT from an Uphold BAT wallet to the BAT address Brave generated and ensured that the funds were received and displayed under brave://rewards

Nuked the entire profile and restored the two above wallets.. Ensured everything still matched.

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