diff options
author | Francesco Agosti <francesco.agosti93@gmail.com> | 2018-11-09 08:29:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-09 08:29:34 +0800 |
commit | 3eac119399d3e2729ce65f748d9fb31207ac2540 (patch) | |
tree | 558aa4bb76eae3418cf411fcfba089ef8edf19ef /packages/instant/src/util/format.ts | |
parent | 117e2f583ff44bdb63340a2134edea0f3ecb77b3 (diff) | |
parent | cd44470a29c48275e6a2a4bba42734d8f900d387 (diff) | |
download | dexon-0x-contracts-3eac119399d3e2729ce65f748d9fb31207ac2540.tar dexon-0x-contracts-3eac119399d3e2729ce65f748d9fb31207ac2540.tar.gz dexon-0x-contracts-3eac119399d3e2729ce65f748d9fb31207ac2540.tar.bz2 dexon-0x-contracts-3eac119399d3e2729ce65f748d9fb31207ac2540.tar.lz dexon-0x-contracts-3eac119399d3e2729ce65f748d9fb31207ac2540.tar.xz dexon-0x-contracts-3eac119399d3e2729ce65f748d9fb31207ac2540.tar.zst dexon-0x-contracts-3eac119399d3e2729ce65f748d9fb31207ac2540.zip |
Merge pull request #1230 from 0xProject/feature/instant/dropdown-ui
[instant] Dropdown Component Skeleton
Diffstat (limited to 'packages/instant/src/util/format.ts')
-rw-r--r-- | packages/instant/src/util/format.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/instant/src/util/format.ts b/packages/instant/src/util/format.ts index 4a48dec9d..44661d697 100644 --- a/packages/instant/src/util/format.ts +++ b/packages/instant/src/util/format.ts @@ -50,4 +50,7 @@ export const format = { } return `$${ethUnitAmount.mul(ethUsdPrice).toFixed(decimalPlaces)}`; }, + ethAddress: (address: string): string => { + return `0x${address.slice(2, 7)}…${address.slice(-5)}`; + }, }; |