Skip to content

Commit f47d772

Browse files
Merge pull request #6063 from BitGo/COIN-3222-lowercase
chore: convert to lowercase before validating
2 parents 0c7b98c + 957bbf0 commit f47d772

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/abstract-eth/src/abstractEthLikeNewCoins.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,7 +2557,7 @@ export abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin {
25572557
if (expectedAmount !== txJson.value) {
25582558
throw new Error('the transaction amount in txPrebuild does not match the value given by client');
25592559
}
2560-
if (expectedDestination !== txJson.to) {
2560+
if (expectedDestination.toLowerCase() !== txJson.to.toLowerCase()) {
25612561
throw new Error('destination address does not match with the recipient address');
25622562
}
25632563
} else if (txJson.data.startsWith('0xa9059cbb')) {
@@ -2568,7 +2568,7 @@ export abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin {
25682568
if (expectedAmount !== amount.toString()) {
25692569
throw new Error('the transaction amount in txPrebuild does not match the value given by client');
25702570
}
2571-
if (expectedDestination !== addHexPrefix(recipientAddress.toString())) {
2571+
if (expectedDestination.toLowerCase() !== addHexPrefix(recipientAddress.toString()).toLowerCase()) {
25722572
throw new Error('destination address does not match with the recipient address');
25732573
}
25742574
}

0 commit comments

Comments
 (0)