aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-04-11 16:48:46 +0800
committerJacob Evans <jacob@dekz.net>2018-04-11 17:08:28 +0800
commit916b4d3a26e6189c77634b0d2cde4d20bb4cb9a9 (patch)
tree663308bd8318c36867d4b216ea3ebcb15c6aa7cf /packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
parentf44ef7ce59cd5c811a92662d3fb095f21d80f665 (diff)
downloaddexon-sol-tools-916b4d3a26e6189c77634b0d2cde4d20bb4cb9a9.tar
dexon-sol-tools-916b4d3a26e6189c77634b0d2cde4d20bb4cb9a9.tar.gz
dexon-sol-tools-916b4d3a26e6189c77634b0d2cde4d20bb4cb9a9.tar.bz2
dexon-sol-tools-916b4d3a26e6189c77634b0d2cde4d20bb4cb9a9.tar.lz
dexon-sol-tools-916b4d3a26e6189c77634b0d2cde4d20bb4cb9a9.tar.xz
dexon-sol-tools-916b4d3a26e6189c77634b0d2cde4d20bb4cb9a9.tar.zst
dexon-sol-tools-916b4d3a26e6189c77634b0d2cde4d20bb4cb9a9.zip
Renamed DerivedHDKey to DerivedHDKeyInfo
Added assertions on addresses for public methods Throw a helpful error message when signer address is not instantiated address in PrivateKeyWalletSubprovider Update changelog and rename derivationBasePath to baseDerivationPath When returning undefined use pattern of IfExists Added configuration object for MnemonicWallet Put constants back into each individual wallet rather than in walletUtils Delete accidental package-lock.json
Diffstat (limited to 'packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts')
-rw-r--r--packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
index 9131a8b6a..93300f47d 100644
--- a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
@@ -21,10 +21,10 @@ const expect = chai.expect;
describe('MnemonicWalletSubprovider', () => {
let subprovider: MnemonicWalletSubprovider;
before(async () => {
- subprovider = new MnemonicWalletSubprovider(
- fixtureData.TEST_RPC_MNEMONIC,
- fixtureData.TEST_RPC_MNEMONIC_DERIVATION_PATH,
- );
+ subprovider = new MnemonicWalletSubprovider({
+ mnemonic: fixtureData.TEST_RPC_MNEMONIC,
+ baseDerivationPath: fixtureData.TEST_RPC_MNEMONIC_BASE_DERIVATION_PATH,
+ });
});
describe('direct method calls', () => {
describe('success cases', () => {
@@ -157,11 +157,11 @@ describe('MnemonicWalletSubprovider', () => {
provider.sendAsync(payload, callback);
});
it('should throw if `address` param not found when calling personal_sign', (done: DoneCallback) => {
- const nonHexMessage = 'hello world';
+ const messageHex = ethUtils.bufferToHex(ethUtils.toBuffer(fixtureData.PERSONAL_MESSAGE_STRING));
const payload = {
jsonrpc: '2.0',
method: 'personal_sign',
- params: [nonHexMessage, fixtureData.NULL_ADDRESS],
+ params: [messageHex, fixtureData.NULL_ADDRESS],
id: 1,
};
const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {