Skip to content

Commit

Permalink
Merge pull request #4022 from BitGo/EA-1618
Browse files Browse the repository at this point in the history
fix(sdk-coin-ton): validate TON address length
  • Loading branch information
noel-bitgo authored Oct 26, 2023
2 parents c5daa6d + c32fa93 commit 8f9d08c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/sdk-coin-ton/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export class Utils implements BaseUtils {
/** @inheritdoc */
isValidAddress(address: string): boolean {
try {
if (address.length != 48) {
return false;
}
Buffer.from(address, 'base64');
return true;
} catch (e) {
Expand Down

0 comments on commit 8f9d08c

Please sign in to comment.