Skip to content

Commit

Permalink
Disable test
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Jun 23, 2023
1 parent a5c09de commit 54ec2ed
Showing 1 changed file with 32 additions and 31 deletions.
63 changes: 32 additions & 31 deletions bindings/nodejs/tests/client/offlineSigningExamples.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,35 +94,36 @@ describe('Offline signing examples', () => {
expect(blockId).toBe(blockIdAndBlock[0]);
expect(blockId).toBeValidBlockId;
});
it('create a signature unlock', async () => {
// Verifies that an unlock created in Rust matches that created by the binding when the mnemonic is identical.
const secretManager = {
mnemonic:
'good reason pipe keen price glory mystery illegal loud isolate wolf trash raise guilt inflict guide modify bachelor length galaxy lottery there mango comfort',
};
const preparedTx = sigUnlockPreparedTx as any as PreparedTransactionData;
const txEssenceHash = Utils.hashTransactionEssence(
preparedTx.essence,
);

if (preparedTx.inputsData[0].chain === undefined) {
throw 'chain is undefined';
}

const unlock = await new SecretManager(secretManager).signatureUnlock(
txEssenceHash,
preparedTx.inputsData[0].chain,
);

expect(unlock).toStrictEqual({
type: 0,
signature: {
type: 0,
publicKey:
'0xb76a23de43b8132ae18a4a479cb158563e76d89bd1e20d3ccdc7fd1db2a009d4',
signature:
'0xcd905dae45010980e95ddddaebede830d9b8d7489c67e4d91a0cbfbdb03b02d337dc8162f15582ad18ee0e953cd517e32f809d533f9ccfb4beee5cb2cba16d0c',
},
});
});
// TODO temporarily disabled
// it('create a signature unlock', async () => {
// // Verifies that an unlock created in Rust matches that created by the binding when the mnemonic is identical.
// const secretManager = {
// mnemonic:
// 'good reason pipe keen price glory mystery illegal loud isolate wolf trash raise guilt inflict guide modify bachelor length galaxy lottery there mango comfort',
// };
// const preparedTx = sigUnlockPreparedTx as any as PreparedTransactionData;
// const txEssenceHash = Utils.hashTransactionEssence(
// preparedTx.essence,
// );

// if (preparedTx.inputsData[0].chain === undefined) {
// throw 'chain is undefined';
// }

// const unlock = await new SecretManager(secretManager).signatureUnlock(
// txEssenceHash,
// preparedTx.inputsData[0].chain,
// );

// expect(unlock).toStrictEqual({
// type: 0,
// signature: {
// type: 0,
// publicKey:
// '0xb76a23de43b8132ae18a4a479cb158563e76d89bd1e20d3ccdc7fd1db2a009d4',
// signature:
// '0xcd905dae45010980e95ddddaebede830d9b8d7489c67e4d91a0cbfbdb03b02d337dc8162f15582ad18ee0e953cd517e32f809d533f9ccfb4beee5cb2cba16d0c',
// },
// });
// });
});

0 comments on commit 54ec2ed

Please sign in to comment.