daimo-eth / daimo

Dollars, anywhere in the world
https://daimo.com
GNU General Public License v3.0
364 stars 30 forks source link

Stuck on "Creating account..." #695

Closed dcposch closed 8 months ago

dcposch commented 8 months ago

Summary

UI sometimes gets stuck during account creation. Account creation succeeds.

Investigation

This bug should be fixed by decoupling onboarding UI from account creation logic.

[ONBOARDING] chainId baseSepolia
 LOG  [ACTION] 0ms: idle > loading Creating account...
 LOG  [ONBOARDING] create account test23 idle
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [TRPC] fetching http://192.168.1.22:3000/chain/84532/deployWallet?batch=1, timeout 60000ms {"body": "{\"0\":{\"name\":\"test23\",\"pubKeyHex\":\"0x3059301306072a8648ce3d020106082a8648ce3d0301070342000475092d95ffec5cea8e599d852262c62a45e71b533bbf89c6b55297b2829e5a6257e5aa86e879da417e5a28abb41c3587062b8dc30f8048097f2732de01551847\",\"inviteLink\":\"http://localhost:3001/link/invite/testnet\"}}", "headers": {"content-type": "application/json", "x-daimo-platform": "ios 17.0.1", "x-daimo-version": "1.5.0 #100"}, "method": "POST", "signal": {}}
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [ONBOARDING] loading status loading
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [TRPC] POST deployWallet 200 in 6325ms
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [SYNC] RESYNC test12, interval 10s
 LOG  [TRPC] fetching http://192.168.1.22:3000/chain/84532/getAccountHistory?batch=1&input=%7B%220%22%3A%7B%22address%22%3A%220x96b7f09c81F8510f0342aDA751094B5dc6171663%22%2C%22sinceBlockNum%22%3A5922978%7D%7D, timeout 10000ms {"body": undefined, "headers": {"content-type": "application/json", "x-daimo-platform": "ios 17.0.1", "x-daimo-version": "1.5.0 #100"}, "method": "GET", "signal": {}}
 LOG  [TRPC] GET getAccountHistory 200 in 177ms
 LOG  [SYNC] got history {"address":"0x96b7f09c81F8510f0342aDA751094B5dc6171663","name":"test12","sinceBlockNum":5922978,"lastBlock":5923521,"lastBlockTimestamp":1707615330,"lastFinalizedBlock":5922798,"lastBalance":"1050000","numTransfers":0,"numNamedAccounts":0,"numAccountKeys":1,"chainGasConstants":{"estimatedFee":0.1,"paymasterAddress":"0x0000000000dd6dd248ab5487218e1c2d7fbb29c9","maxPriorityFeePerGas":"1150000","maxFeePerGas":"1150349","preVerificationGas":"10000000"},"recommendedExchanges":[{"cta":"Bridge from any wallet","url":"https://daimo.com/bridge/test12"},{"cta":"Deposit from Coinbase","url":"https://pay.coinbase.com/buy/select-asset?appId=2be3ccd9-6ee4-4dba-aba8-d4b458fe476d&defaultExperience=send&destinationWallets=%5B%7B%22address%22%3A%220x96b7f09c81F8510f0342aDA751094B5dc6171663%22%2C%22assets%22%3A%5B%22USDC%22%5D%2C%22supportedNetworks%22%3A%5B%22base%22%5D%7D%5D"}],"suggestedActions":[{"id":"passkey-backup-new-account","title":"Secure your account","subtitle":"Keep your account safe with a passkey backup","url":"daimo://settings/add-passkey"},{"id":"2023-12-join-tg-5","icon":"comment-discussion","title":"Feedback? Ideas?","subtitle":"Join our Telegram group.","url":"https://t.me/+to2ghQJfgic0YjA9"}]}
 LOG  [SYNC] skipping sync result for 0x96b7f09c81F8510f0342aDA751094B5dc6171663. Server has finalized block 5922798 < local 5922978
 LOG  [SYNC] SUCCEEDED test12
 LOG  [ACCOUNT] save test12
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [SYNC] skipping sync, attempted sync recently
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [SYNC] RESYNC test12, interval 10s
 LOG  [TRPC] fetching http://192.168.1.22:3000/chain/84532/getAccountHistory?batch=1&input=%7B%220%22%3A%7B%22address%22%3A%220x96b7f09c81F8510f0342aDA751094B5dc6171663%22%2C%22sinceBlockNum%22%3A5922978%7D%7D, timeout 10000ms {"body": undefined, "headers": {"content-type": "application/json", "x-daimo-platform": "ios 17.0.1", "x-daimo-version": "1.5.0 #100"}, "method": "GET", "signal": {}}
 LOG  [TRPC] GET getAccountHistory 200 in 184ms
 LOG  [SYNC] got history {"address":"0x96b7f09c81F8510f0342aDA751094B5dc6171663","name":"test12","sinceBlockNum":5922978,"lastBlock":5923527,"lastBlockTimestamp":1707615342,"lastFinalizedBlock":5922978,"lastBalance":"1050000","numTransfers":0,"numNamedAccounts":0,"numAccountKeys":1,"chainGasConstants":{"estimatedFee":0.1,"paymasterAddress":"0x0000000000dd6dd248ab5487218e1c2d7fbb29c9","maxPriorityFeePerGas":"1150000","maxFeePerGas":"1150349","preVerificationGas":"10000000"},"recommendedExchanges":[{"cta":"Bridge from any wallet","url":"https://daimo.com/bridge/test12"},{"cta":"Deposit from Coinbase","url":"https://pay.coinbase.com/buy/select-asset?appId=2be3ccd9-6ee4-4dba-aba8-d4b458fe476d&defaultExperience=send&destinationWallets=%5B%7B%22address%22%3A%220x96b7f09c81F8510f0342aDA751094B5dc6171663%22%2C%22assets%22%3A%5B%22USDC%22%5D%2C%22supportedNetworks%22%3A%5B%22base%22%5D%7D%5D"}],"suggestedActions":[{"id":"passkey-backup-new-account","title":"Secure your account","subtitle":"Keep your account safe with a passkey backup","url":"daimo://settings/add-passkey"},{"id":"2023-12-join-tg-5","icon":"comment-discussion","title":"Feedback? Ideas?","subtitle":"Join our Telegram group.","url":"https://t.me/+to2ghQJfgic0YjA9"}]}
 LOG  [SYNC] synced test12 0x96b7f09c81F8510f0342aDA751094B5dc6171663.
{"oldBlock":5923517,"oldBalance":"1.05","oldTransfers":2,"newBlock":5923527,"newBalance":"1.05","newTransfers":2,"nPending":0}
 LOG  [SYNC] SUCCEEDED test12
 LOG  [ACCOUNT] save test12
 LOG  [APP] rendering
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [APP] rendering
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [ONBOARDING] chainId baseSepolia
 LOG  [ONBOARDING] chainId baseSepolia
dcposch commented 8 months ago
image