diff options
author | Fabio Berger <me@fabioberger.com> | 2017-06-02 18:15:50 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-06-02 18:15:50 +0800 |
commit | fc7592d73f1613b11e4b48904bfb041cccca5800 (patch) | |
tree | aef03ea37e7bed7209bccca3c1965ac99d09c954 /src/0x.js.ts | |
parent | 5155f4980440f1c91006b124406c8b4a7a90e300 (diff) | |
download | dexon-sol-tools-fc7592d73f1613b11e4b48904bfb041cccca5800.tar dexon-sol-tools-fc7592d73f1613b11e4b48904bfb041cccca5800.tar.gz dexon-sol-tools-fc7592d73f1613b11e4b48904bfb041cccca5800.tar.bz2 dexon-sol-tools-fc7592d73f1613b11e4b48904bfb041cccca5800.tar.lz dexon-sol-tools-fc7592d73f1613b11e4b48904bfb041cccca5800.tar.xz dexon-sol-tools-fc7592d73f1613b11e4b48904bfb041cccca5800.tar.zst dexon-sol-tools-fc7592d73f1613b11e4b48904bfb041cccca5800.zip |
Fix getTransactionSenderAccountIfExistsAsync to return true senderAddress or undefined if non available
Diffstat (limited to 'src/0x.js.ts')
-rw-r--r-- | src/0x.js.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/0x.js.ts b/src/0x.js.ts index 6713ec885..679d748e7 100644 --- a/src/0x.js.ts +++ b/src/0x.js.ts @@ -124,10 +124,11 @@ export class ZeroEx { this.web3Wrapper.setDefaultAccount(account); } /** - * Gets default account for sending transactions. + * Get the default account set for sending transactions. */ - public getTransactionSenderAccount(): string { - return this.web3Wrapper.getDefaultAccount(); + public async getTransactionSenderAccountIfExistsAsync(): Promise<string|undefined> { + const senderAccountIfExists = await this.web3Wrapper.getSenderAddressIfExistsAsync(); + return senderAccountIfExists; } /** * Computes the orderHash given the order parameters and returns it as a hex encoded string. |