@saberhq/chai-solana
Advanced tools
Comparing version 1.12.9 to 1.12.12
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.debugAccountOwners = void 0; | ||
const tslib_1 = require("tslib"); | ||
const anchor_1 = require("@project-serum/anchor"); | ||
@@ -45,7 +44,5 @@ const solana_contrib_1 = require("@saberhq/solana-contrib"); | ||
function debugAccountOwners(plainObj) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return (0, solana_contrib_1.printAccountOwners)(anchor_1.Provider.env().connection, plainObj); | ||
}); | ||
return (0, solana_contrib_1.printAccountOwners)(anchor_1.Provider.env().connection, plainObj); | ||
} | ||
exports.debugAccountOwners = debugAccountOwners; | ||
//# sourceMappingURL=debugAccountOwners.js.map |
@@ -24,3 +24,3 @@ import type { TransactionEnvelope } from "@saberhq/solana-contrib"; | ||
*/ | ||
export declare const expectTXTable: (tx: TransactionEnvelope, msg: string, verbosity?: "printLogs" | undefined) => Chai.PromisedAssertion; | ||
export declare const expectTXTable: (tx: TransactionEnvelope, msg?: string | undefined, verbosity?: "printLogs" | undefined) => Chai.PromisedAssertion; | ||
//# sourceMappingURL=expectTXTable.d.ts.map |
@@ -55,3 +55,3 @@ "use strict"; | ||
if ((_a = simulation === null || simulation === void 0 ? void 0 : simulation.value) === null || _a === void 0 ? void 0 : _a.logs) { | ||
(0, solana_contrib_1.printTXTable)(tx, simulation.value.logs, `${msg} ${relativePath ? ` (${relativePath})` : ""}`); | ||
(0, solana_contrib_1.printTXTable)(tx, simulation.value.logs, `${msg ? msg + " " : ""}${relativePath ? `(${relativePath})` : ""}`); | ||
} | ||
@@ -87,5 +87,5 @@ const logs = (_b = simulation === null || simulation === void 0 ? void 0 : simulation.value) === null || _b === void 0 ? void 0 : _b.logs; | ||
}); | ||
return (0, utils_1.expectTX)(tx, msg + (relativePath ? ` (${relativePath})` : "")); | ||
return (0, utils_1.expectTX)(tx, (msg || "") + (relativePath ? ` (${relativePath})` : "")); | ||
}; | ||
exports.expectTXTable = expectTXTable; | ||
//# sourceMappingURL=expectTXTable.js.map |
@@ -1,2 +0,1 @@ | ||
import { __awaiter } from "tslib"; | ||
import { Provider as AnchorProvider } from "@project-serum/anchor"; | ||
@@ -42,6 +41,4 @@ import { printAccountOwners } from "@saberhq/solana-contrib"; | ||
export function debugAccountOwners(plainObj) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return printAccountOwners(AnchorProvider.env().connection, plainObj); | ||
}); | ||
return printAccountOwners(AnchorProvider.env().connection, plainObj); | ||
} | ||
//# sourceMappingURL=debugAccountOwners.js.map |
@@ -24,3 +24,3 @@ import type { TransactionEnvelope } from "@saberhq/solana-contrib"; | ||
*/ | ||
export declare const expectTXTable: (tx: TransactionEnvelope, msg: string, verbosity?: "printLogs" | undefined) => Chai.PromisedAssertion; | ||
export declare const expectTXTable: (tx: TransactionEnvelope, msg?: string | undefined, verbosity?: "printLogs" | undefined) => Chai.PromisedAssertion; | ||
//# sourceMappingURL=expectTXTable.d.ts.map |
@@ -52,3 +52,3 @@ import { printTXTable } from "@saberhq/solana-contrib"; | ||
if ((_a = simulation === null || simulation === void 0 ? void 0 : simulation.value) === null || _a === void 0 ? void 0 : _a.logs) { | ||
printTXTable(tx, simulation.value.logs, `${msg} ${relativePath ? ` (${relativePath})` : ""}`); | ||
printTXTable(tx, simulation.value.logs, `${msg ? msg + " " : ""}${relativePath ? `(${relativePath})` : ""}`); | ||
} | ||
@@ -84,4 +84,4 @@ const logs = (_b = simulation === null || simulation === void 0 ? void 0 : simulation.value) === null || _b === void 0 ? void 0 : _b.logs; | ||
}); | ||
return expectTX(tx, msg + (relativePath ? ` (${relativePath})` : "")); | ||
return expectTX(tx, (msg || "") + (relativePath ? ` (${relativePath})` : "")); | ||
}; | ||
//# sourceMappingURL=expectTXTable.js.map |
{ | ||
"name": "@saberhq/chai-solana", | ||
"version": "1.12.9", | ||
"version": "1.12.12", | ||
"description": "Solana Chai helpers", | ||
@@ -35,3 +35,3 @@ "author": "Ian Macalinao <ian@saber.so>", | ||
}, | ||
"gitHead": "80b2e700ac0e7e4f6ebf2e9ff96b981b6452a0bb", | ||
"gitHead": "b185a52d182d8b8e391006d5ee5e4f7d01bed443", | ||
"publishConfig": { | ||
@@ -50,4 +50,4 @@ "access": "public" | ||
"@project-serum/anchor": "^0.19.1-beta.1", | ||
"@saberhq/solana-contrib": "^1.12.9", | ||
"@saberhq/token-utils": "^1.12.9", | ||
"@saberhq/solana-contrib": "^1.12.12", | ||
"@saberhq/token-utils": "^1.12.12", | ||
"@solana/web3.js": "^1.31.0", | ||
@@ -54,0 +54,0 @@ "bn.js": "^5.2.0", |
@@ -41,4 +41,4 @@ import { Provider as AnchorProvider } from "@project-serum/anchor"; | ||
*/ | ||
export async function debugAccountOwners(plainObj: object): Promise<void> { | ||
export function debugAccountOwners(plainObj: object): Promise<void> { | ||
return printAccountOwners(AnchorProvider.env().connection, plainObj); | ||
} |
@@ -30,3 +30,3 @@ import type { TransactionEnvelope } from "@saberhq/solana-contrib"; | ||
tx: TransactionEnvelope, | ||
msg: string, | ||
msg?: string, | ||
verbosity?: "printLogs" | ||
@@ -67,3 +67,3 @@ ): Chai.PromisedAssertion => { | ||
simulation.value.logs, | ||
`${msg} ${relativePath ? ` (${relativePath})` : ""}` | ||
`${msg ? msg + " " : ""}${relativePath ? `(${relativePath})` : ""}` | ||
); | ||
@@ -107,3 +107,3 @@ } | ||
return expectTX(tx, msg + (relativePath ? ` (${relativePath})` : "")); | ||
return expectTX(tx, (msg || "") + (relativePath ? ` (${relativePath})` : "")); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
107150
1018