Skip to content
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

Chore/replace tokeninfo with mint public key #122

Merged
merged 5 commits into from
Jul 30, 2024
Merged

Conversation

00xSam
Copy link
Collaborator

@00xSam 00xSam commented Jul 19, 2024

No description provided.

@@ -76,7 +75,7 @@ const getAllVaultState = async (tokenInfos: Array<TokenInfo>, program: VaultProg
});
};

const getAllVaultStateByPda = async (tokensInfoPda: Array<TokenInfoPda>, program: VaultProgram) => {
const getAllVaultStateByPda = async (tokensInfoPda: Array<PdaInfo>, program: VaultProgram) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

should change tokensInfoPda -> vaultsInfoPda

@@ -502,7 +500,7 @@ export default class VaultImpl implements VaultImplementation {
}

// If it's SOL vault, wrap desired amount of SOL
if (this.tokenInfo.address === NATIVE_MINT.toString()) {
if (this.vaultMint.equals(NATIVE_MINT)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why call vaultMint? why not call it tokenMint?
I'm bit confused for that naming

@@ -30,10 +29,10 @@ import { IDL, Vault as VaultIdl } from './idl';
import { IDL as AffiliateIDL, AffiliateVault as AffiliateVaultIdl } from './affiliate-idl';
import { calculateWithdrawableAmount } from './helper';

type TokenInfoPda = { info: TokenInfo; vaultPda: PublicKey; tokenVaultPda: PublicKey; lpMintPda: PublicKey };
type PdaInfo = { vaultMint: PublicKey; vaultPda: PublicKey; tokenVaultPda: PublicKey; lpMintPda: PublicKey };
Copy link
Contributor

Choose a reason for hiding this comment

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

should we reaming vaultMint to tokenMint?

@andrewsource147 andrewsource147 merged commit 0d5acb7 into main Jul 30, 2024
4 of 6 checks passed
@andrewsource147 andrewsource147 deleted the refactor-v1 branch July 30, 2024 05:22
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.

3 participants