aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/address.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/util/address.ts')
-rw-r--r--packages/instant/src/util/address.ts6
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..b21863a8e
--- /dev/null
+++ b/packages/instant/src/util/address.ts
@@ -0,0 +1,6 @@
+import { Web3Wrapper } from '@0x/web3-wrapper';
+
+export const getBestAddress = async (web3Wrapper: Web3Wrapper): Promise<string | undefined> => {
+ const addresses = await web3Wrapper.getAvailableAddressesAsync();
+ return addresses[0];
+};