Skip to content

Commit

Permalink
solana: update arg name in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsaigle committed Apr 2, 2024
1 parent e87c404 commit 065aa32
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions solana/ts/sdk/ntt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class NTT {
const releaseIx: TransactionInstruction = await this.createReleaseOutboundInstruction({
payer: args.payer.publicKey,
outboxItem: outboxItem.publicKey,
revertOnDelay: !args.shouldQueue
revertWhenNotReady: !args.shouldQueue
})

const signers = [args.payer, args.fromAuthority, outboxItem]
Expand Down Expand Up @@ -379,13 +379,13 @@ export class NTT {
async createReleaseOutboundInstruction(args: {
payer: PublicKey
outboxItem: PublicKey
revertOnDelay: boolean
revertWhenNotReady: boolean
}): Promise<TransactionInstruction> {
const whAccs = getWormholeDerivedAccounts(this.program.programId, this.wormholeId)

return await this.program.methods
.releaseWormholeOutbound({
revertOnDelay: args.revertOnDelay
revertWhenNotReady: args.revertWhenNotReady
})
.accounts({
payer: args.payer,
Expand All @@ -407,7 +407,7 @@ export class NTT {
async releaseOutbound(args: {
payer: Keypair
outboxItem: PublicKey
revertOnDelay: boolean
revertWhenNotReady: boolean
config?: Config
}) {
if (await this.isPaused()) {
Expand All @@ -432,7 +432,7 @@ export class NTT {
payer: PublicKey
chain: ChainName | ChainId
nttMessage: NttMessage
revertOnDelay: boolean
revertWhenNotReady: boolean
recipient?: PublicKey
config?: Config
}): Promise<TransactionInstruction> {
Expand All @@ -449,7 +449,7 @@ export class NTT {

return await this.program.methods
.releaseInboundMint({
revertOnDelay: args.revertOnDelay
revertWhenNotReady: args.revertWhenNotReady
})
.accounts({
common: {
Expand All @@ -468,7 +468,7 @@ export class NTT {
payer: Keypair
chain: ChainName | ChainId
nttMessage: NttMessage
revertOnDelay: boolean
revertWhenNotReady: boolean
config?: Config
}): Promise<void> {
if (await this.isPaused()) {
Expand All @@ -491,7 +491,7 @@ export class NTT {
payer: PublicKey
chain: ChainName | ChainId
nttMessage: NttMessage
revertOnDelay: boolean
revertWhenNotReady: boolean
recipient?: PublicKey
config?: Config
}): Promise<TransactionInstruction> {
Expand All @@ -508,7 +508,7 @@ export class NTT {

return await this.program.methods
.releaseInboundUnlock({
revertOnDelay: args.revertOnDelay
revertWhenNotReady: args.revertWhenNotReady
})
.accounts({
common: {
Expand All @@ -528,7 +528,7 @@ export class NTT {
payer: Keypair
chain: ChainName | ChainId
nttMessage: NttMessage
revertOnDelay: boolean
revertWhenNotReady: boolean
config?: Config
}): Promise<void> {
if (await this.isPaused()) {
Expand Down Expand Up @@ -747,7 +747,7 @@ export class NTT {
// In case the redeemed amount exceeds the remaining inbound rate limit capacity,
// the transaction gets delayed. If this happens, the second instruction will not actually
// be able to release the transfer yet.
// To make sure the transaction still succeeds, we set revertOnDelay to false, which will
// To make sure the transaction still succeeds, we set revertWhenNotReady to false, which will
// just make the second instruction a no-op in case the transfer is delayed.

const tx = new Transaction()
Expand All @@ -760,7 +760,7 @@ export class NTT {
nttMessage,
recipient: new PublicKey(nttMessage.payload.recipientAddress.toUint8Array()),
chain: chainId,
revertOnDelay: false,
revertWhenNotReady: false,
config: config
}

Expand Down

0 comments on commit 065aa32

Please sign in to comment.