test(sdk-coin-eos): add coverage for memoId=0 address handling#9314
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
test(sdk-coin-eos): add coverage for memoId=0 address handling#9314bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
Add test cases for EOS address handling when memoId equals '0' (the first receive address index). The string '0' is truthy in JavaScript but differs from other memo IDs in being numerically zero, which can trigger subtle falsy-check bugs. Added tests for: - getAddressDetails with ?memoId=0 - isValidAddress with ?memoId=0 - isValidMemoId with value '0' - verifyAddress with ?memoId=0 - verifyTransaction with a tx containing memo='0' and recipient address ?memoId=0 All tests confirm the SDK handles memoId=0 correctly. These tests provide regression coverage against future changes that might inadvertently break the falsy-safe '0' handling. Ticket: COINS-1232 Co-Authored-By: Claude <noreply@anthropic.com> Session-Id: b9aaf785-eb22-46b4-853a-ee44f3d06a1a Task-Id: 0bb9551a-800d-4e1e-b09f-fe82f03b7754
Contributor
bitgo-ai-agent-dev
Bot
force-pushed
the
fix/COINS-1232-eos-memoId-zero-approval
branch
from
July 21, 2026 15:41
0dd53bb to
fef3e6d
Compare
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.
What
memoId='0'(the first receive address index)getAddressDetails,isValidAddress,isValidMemoId,verifyAddress, andverifyTransactionwithmemoId=0Why
memoId=0(e.g.rqzdy4z2pigj?memoId=0), which is the first and most commonly used receive address for EOS wallets'0'is truthy in JavaScript, but differs from other memo IDs by being numerically zero — this creates a subtle risk of falsy-check bugs in code that checksif (!memoId)orif (memoId && ...)without using strict comparisonsmemoId=0must be treated the same as any other valid memoId valueTest plan
memoId=0tests added and passingTicket: COINS-1232