@divvy-bet/sdk
Advanced tools
Comparing version 0.13.5 to 0.13.6
{ | ||
"name": "@divvy-bet/sdk", | ||
"version": "0.13.5", | ||
"version": "0.13.6", | ||
"main": "./src/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./src/index.d.ts", |
@@ -6,3 +6,3 @@ import { BN } from "@coral-xyz/anchor"; | ||
import { Game } from "./game"; | ||
import { BetType, BetV2 } from "./betV2"; | ||
import { BetStatus, BetType, BetV2 } from "./betV2"; | ||
export type SlipData = { | ||
@@ -45,3 +45,6 @@ bettor: PublicKey; | ||
}): Promise<TransactionInstruction[]>; | ||
closeIX(): Promise<Array<TransactionInstruction>>; | ||
closeIX({ status, isHalf, }: { | ||
status: BetStatus; | ||
isHalf: boolean; | ||
}): Promise<Array<TransactionInstruction>>; | ||
create({ odds, betAmount, maxLockedLiquidity, lutAccounts, foremanKP, payerKP, }: { | ||
@@ -48,0 +51,0 @@ odds: number; |
@@ -178,7 +178,7 @@ "use strict"; | ||
} | ||
closeIX() { | ||
closeIX({ status, isHalf, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const ixs = []; | ||
const remainingAccounts = []; | ||
if (this.bet.status !== betV2_1.BetStatus.Lose || this.bet.data.isHalf) { | ||
if (status !== betV2_1.BetStatus.Lose || isHalf) { | ||
if (this.bet.house.data.currency.equals(spl_token_1.NATIVE_MINT)) { | ||
@@ -185,0 +185,0 @@ remainingAccounts.push({ |
Sorry, the diff of this file is not supported yet
294765
5911