-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
ts-client/src/vault/index.ts
Outdated
@@ -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) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should change tokensInfoPda -> vaultsInfoPda
ts-client/src/vault/index.ts
Outdated
@@ -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)) { |
There was a problem hiding this comment.
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
ts-client/src/vault/index.ts
Outdated
@@ -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 }; |
There was a problem hiding this comment.
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?
No description provided.