wallet-storage
Version:
BRC100 conforming wallet, wallet storage and wallet signer components
31 lines • 1.3 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const TestUtilsWalletStorage_1 = require("../../utils/TestUtilsWalletStorage");
describe('RelinquishOutputArgs tests', () => {
jest.setTimeout(99999999);
const env = TestUtilsWalletStorage_1._tu.getEnv('test');
const ctxs = [];
beforeAll(async () => {
if (!env.noMySQL)
ctxs.push(await TestUtilsWalletStorage_1._tu.createLegacyWalletMySQLCopy('relinquishActionTests'));
ctxs.push(await TestUtilsWalletStorage_1._tu.createLegacyWalletSQLiteCopy('relinquishActionTests'));
});
afterAll(async () => {
for (const ctx of ctxs) {
await ctx.storage.destroy();
}
});
test('1_default', async () => {
const outputTxid = '2795b293c698b2244147aaba745db887a632d21990c474df46d842ec3e52f122';
const expectedResult = { relinquished: true };
for (const { wallet, activeStorage: storage } of ctxs) {
const args = {
basket: 'default',
output: `${outputTxid}.0`
};
const r1 = await wallet.relinquishOutput(args);
await expect(Promise.resolve(r1)).resolves.toEqual(expectedResult);
}
});
});
//# sourceMappingURL=relinquishOutput.test.js.map