Repository navigation
Conversation
…failure (lnflash#90) Account creation could persist the Account record and then fail while the IBEX cash wallets were being provisioned, leaving an account with no defaultWalletId and no way to recover: every later read kept returning the same half-built account. - add src/app/accounts/ensure-account-wallets.ts with createMissingCashWallets() which fills only the missing currencies (reusing an existing Checking wallet per currency) and ensureCashWallets() which re-runs that gap fill, repairs defaultWalletId and persists the account - required-currency failures are returned, optional ones are logged and the loop continues, so a single IBEX hiccup no longer blocks the whole account - create-account.ts now delegates provisioning to the same helper so both paths share one routine - getAccountFromUserId() calls ensureCashWallets() when defaultWalletId is unset, so an affected account heals on the next read instead of failing - add unit coverage for the gap fill, reuse, error propagation, idempotent repair and the missing-wallet CouldNotFindError path
Author
|
Handle: nul-quill. Payout wallets: Solana USDC BdznDjc4xwt5Y6WJT5UnrFQzDptka8YnC9oqmmkKpwkd, TRC20 TNEHCVwR2aPMrj5AKfWCQ2rFL3bEDQmsg7. Shipped in #522: ensureCashWallets() gap-fills missing cash wallets and repairs defaultWalletId, so an account left half-built by an IBEX createAccount failure heals on the next read instead of failing forever. Mocked IBEX failure plus second-attempt success covered in test/flash/unit/app/accounts/ensure-account-wallets.spec.ts; happy-path creation still asserted by create-account.spec.ts. 118 suites / 1431 tests pass. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recover accounts whose IBEX cash wallets were never created.
Tests: jest test/flash/unit/app test/flash/unit/graphql -> 118 suites / 1431 tests pass; sc --noEmit shows only the two pre-existing Express/Application errors.