aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-26 05:07:27 +0800
committerFabio Berger <me@fabioberger.com>2018-06-26 05:07:27 +0800
commit6bb2203f790923a83f6f0665d47d29a90817b371 (patch)
tree9c938a87f3e931d852e6788167868d61df7a2a0c /packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
parent3d56817da14091a2d966dba5e108a6b104e919e3 (diff)
downloaddexon-sol-tools-6bb2203f790923a83f6f0665d47d29a90817b371.tar.gz
dexon-sol-tools-6bb2203f790923a83f6f0665d47d29a90817b371.tar.zst
dexon-sol-tools-6bb2203f790923a83f6f0665d47d29a90817b371.zip
Small stylistic tweaks
Diffstat (limited to 'packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts')
-rw-r--r--packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
index b99dbff2f..c0adb9225 100644
--- a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
@@ -11,6 +11,7 @@ import { reportCallbackErrors } from '../utils/report_callback_errors';
chaiSetup.configure();
const expect = chai.expect;
+
const FAKE_ADDRESS = '0x44be42fd88e22387c43ba9b75941aa3e680dae25';
const NUM_GENERATED_ADDRESSES = 10;
const PASSWORD = 'supersecretpassword99';
@@ -30,7 +31,6 @@ describe('EthLightwalletSubprovider', () => {
const createVaultAsync = async (vaultOptions: lightwallet.VaultOptions) => {
return new Promise<lightwallet.keystore>(resolve => {
- // Create Vault
lightwallet.keystore.createVault(vaultOptions, (err: Error, vaultKeystore) => {
if (err) {
throw new Error(`Failed to createVault: ${err}`);
@@ -39,7 +39,6 @@ describe('EthLightwalletSubprovider', () => {
});
});
};
-
const deriveKeyFromPasswordAsync = async (vaultKeystore: lightwallet.keystore) => {
return new Promise<Uint8Array>(resolve => {
vaultKeystore.keyFromPassword(PASSWORD, (err: Error, passwordDerivedKey: Uint8Array) => {
@@ -50,14 +49,12 @@ describe('EthLightwalletSubprovider', () => {
});
});
};
-
const keystore: lightwallet.keystore = await createVaultAsync(options);
const pwDerivedKey: Uint8Array = await deriveKeyFromPasswordAsync(keystore);
// Generate 10 addresses
keystore.generateNewAddress(pwDerivedKey, NUM_GENERATED_ADDRESSES);
- // Initialize Subprovider
ethLightwalletSubprovider = new EthLightwalletSubprovider(keystore, pwDerivedKey);
});
describe('direct method calls', () => {