Skip to content

Conversation

@abhishekagrawal080
Copy link
Contributor

TICKET: WIN-5670

@abhishekagrawal080 abhishekagrawal080 force-pushed the WIN-5670 branch 3 times, most recently from f70320d to c019ad6 Compare May 29, 2025 07:15
@abhishekagrawal080 abhishekagrawal080 marked this pull request as ready for review May 29, 2025 07:39
@abhishekagrawal080 abhishekagrawal080 requested review from a team as code owners May 29, 2025 07:39
Ranjna-G
Ranjna-G previously approved these changes May 29, 2025
Copy link
Contributor

@Ranjna-G Ranjna-G left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

shashankms288
shashankms288 previously approved these changes May 29, 2025
Copy link
Contributor

@shashankms288 shashankms288 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

contractAddress: string,
asset: UnderlyingAsset,
features: CoinFeature[] = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.REQUIRES_RESERVE],
programId = '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not default it to spl token program id, instead of having an empty string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

veetragjain
veetragjain previously approved these changes May 29, 2025
Comment on lines 2706 to 2710
export enum ProgramID {
TokenProgramId = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
Token2022ProgramId = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This can reside in account.ts file, base.ts have enums and types that are required by baseCoin class. Can you please also add a description for this enum.

const tokensArray = tokens.map((token) => token);
if (tokensArray.length >= 1) {
// there should never be two tokens with the same contract address, so we assert that here
assert(tokensArray.length === 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify if we have any testnet and mainnet token with same contract address. This check will fail in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have checked there is no token with same address in testnet and mainnet

@abhishekagrawal080 abhishekagrawal080 merged commit 5fdf0ad into master May 30, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants