-
Notifications
You must be signed in to change notification settings - Fork 284
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
feat: adding overrides for coredao for non-bitgo recovery support through wrw #5372
Conversation
e93739f
to
152f1f5
Compare
152f1f5
to
c240b6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some code nits, but you are missing tests.
if (!result || !result.result || isNaN(<number>result.result)) { | ||
throw new Error(`Could not obtain address balance for ${address} from the explorer, got: ${result.result}`); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!result || !result.result || isNaN(<number>result.result)) { | |
throw new Error(`Could not obtain address balance for ${address} from the explorer, got: ${result.result}`); | |
} | |
if (!result?.result || isNaN(Number(result.result))) { | |
throw new Error(`Could not obtain address balance for ${address} from the explorer, got: ${result.result}`); | |
} |
if (typeof result.result !== 'string') { | ||
result.result = result.result.toString(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (typeof result.result !== 'string') { | |
result.result = result.result.toString(); | |
} | |
result.result = result.result.toString(); |
you could just unconditionally do this.
const outgoingTxs = backupKeyTxList.filter((tx) => tx.from === address); | ||
nonce = Math.max(...outgoingTxs.map((tx) => tx.nonce as number)) + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest
const outgoingTxs = backupKeyTxList.filter((tx) => tx.from === address); | |
nonce = Math.max(...outgoingTxs.map((tx) => tx.nonce as number)) + 1; | |
nonce = Math.max(...backupKeyTxList | |
.filter((tx) => tx.from === address) | |
.map((tx) => tx.nonce as number) | |
) + 1; |
c240b6a
to
6830e60
Compare
6830e60
to
0905dc6
Compare
Ticket: WIN-4290