Skip to content

Commit

Permalink
NodeJs: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex6323 committed Mar 11, 2024
1 parent 4799768 commit 59b60bd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions bindings/nodejs/tests/wallet/wallet.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
WalletOptions,
SecretManager,
Utils,
Bip44,
} from '../../lib/';

describe('Wallet', () => {
Expand Down Expand Up @@ -86,7 +85,6 @@ describe('Wallet', () => {

const walletOptions = await createDefaultWalletOptions(storagePath);
const wallet = await Wallet.create(walletOptions);
console.log(await wallet.address());
await wallet.destroy();

walletOptions.address = "tst1qpqzgvcehafmlxh87zrf9w8ck8q2kw5070ztf68ylhzk89en9a4fyg6k2w3";
Expand All @@ -95,7 +93,8 @@ describe('Wallet', () => {
const _restoredWallet = await Wallet.create(walletOptions);
throw 'Should return an error because the provided address conflicts with the stored one';
} catch (err: any) {
expect(err.message).toEqual('address tst1qpqzgvcehafmlxh87zrf9w8ck8q2kw5070ztf68ylhzk89en9a4fyg6k2w3 is not the wallet address');
expect(err.message).toEqual(
'wallet address mismatch: tst1qpqzgvcehafmlxh87zrf9w8ck8q2kw5070ztf68ylhzk89en9a4fyg6k2w3, existing address is: smr1qpqzgvcehafmlxh87zrf9w8ck8q2kw5070ztf68ylhzk89en9a4fyq4ten7');
}

removeDir(storagePath);
Expand All @@ -107,7 +106,6 @@ describe('Wallet', () => {

const walletOptions = await createDefaultWalletOptions(storagePath);
const wallet = await Wallet.create(walletOptions);
console.log(await wallet.address());
await wallet.destroy();

walletOptions.bipPath = { coinType: CoinType.IOTA };
Expand All @@ -116,7 +114,7 @@ describe('Wallet', () => {
const _restoredWallet = await Wallet.create(walletOptions);
throw 'Should return an error because the provided bip path conflicts with the stored one';
} catch (err: any) {
expect(err.message).toEqual('BIP44 mismatch: Some(Bip44 { coin_type: 4218, account: 0, change: 0, address_index: 0 }), existing bip path is: Some(Bip44 { coin_type: 4219, account: 0, change: 0, address_index: 0 })');
expect(err.message).toEqual('bip path mismatch: Some(Bip44 { coin_type: 4218, account: 0, change: 0, address_index: 0 }), existing bip path is: Some(Bip44 { coin_type: 4219, account: 0, change: 0, address_index: 0 })');
}

removeDir(storagePath);
Expand All @@ -126,7 +124,6 @@ describe('Wallet', () => {
let storagePath = 'test-error-on-alias-conflict';
removeDir(storagePath);


const walletOptions = await createDefaultWalletOptions(storagePath);
const wallet = await Wallet.create(walletOptions);
await wallet.destroy();
Expand Down

0 comments on commit 59b60bd

Please sign in to comment.