diff options
author | Steve Klebanoff <steve@0xproject.com> | 2018-10-30 01:12:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 01:12:44 +0800 |
commit | 4e4291eccdd6c837bbec70603aa6eb64d3aa8d85 (patch) | |
tree | edf8006576143d5cd1c32b052164ac898c57c8b2 /packages/instant/src/util/address.ts | |
parent | ae6202ed3d777605a3fd02cd29141a3ba40f4b34 (diff) | |
parent | 7ed44f7b2f0224b4169f0a8f34bae09e8c6b986f (diff) | |
download | dexon-0x-contracts-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.tar.gz dexon-0x-contracts-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.tar.zst dexon-0x-contracts-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.zip |
Merge pull request #1193 from 0xProject/feature/not-enough-eth
[instant] Not enough ETH error message
Diffstat (limited to 'packages/instant/src/util/address.ts')
-rw-r--r-- | packages/instant/src/util/address.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/instant/src/util/address.ts b/packages/instant/src/util/address.ts new file mode 100644 index 000000000..14d42d8c0 --- /dev/null +++ b/packages/instant/src/util/address.ts @@ -0,0 +1,6 @@ +import { web3Wrapper } from '../util/web3_wrapper'; + +export const getBestAddress = async (): Promise<string | undefined> => { + const addresses = await web3Wrapper.getAvailableAddressesAsync(); + return addresses[0]; +}; |