Skip to content

Commit

Permalink
feat(zeta): add WRW form changes for zetachain
Browse files Browse the repository at this point in the history
Ticket: WIN-297
  • Loading branch information
Vijay-Jagannathan committed Aug 26, 2023
1 parent 5305767 commit 59e6425
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 19 deletions.
3 changes: 3 additions & 0 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { Trx, Ttrx } from '@bitgo/sdk-coin-trx';
import { Txlm, Xlm } from '@bitgo/sdk-coin-xlm';
import { Txrp, Xrp } from '@bitgo/sdk-coin-xrp';
import { Zec } from '@bitgo/sdk-coin-zec';
import { Zeta, Tzeta } from '@bitgo/sdk-coin-zeta';
import { BaseCoin } from '@bitgo/sdk-core';
import assert from 'assert';
import BIP32Factory from 'bip32';
Expand Down Expand Up @@ -114,6 +115,8 @@ sdk.register('hash', Hash.createInstance);
sdk.register('thash', Thash.createInstance);
sdk.register('sei', Sei.createInstance);
sdk.register('tsei', Tsei.createInstance);
sdk.register('zeta', Zeta.createInstance);
sdk.register('tzeta', Tzeta.createInstance);
Erc20Token.createTokenConstructors().forEach(({ name, coinConstructor }) => {
sdk.register(name, coinConstructor);
});
Expand Down
136 changes: 125 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
}
},
"dependencies": {
"@bitgo/utxo-lib": "9.5.2",
"@bitgo-beta/sdk-coin-atom": "1.0.1-beta.111",
"@bitgo-beta/abstract-cosmos": "^1.0.1-beta.70",
"@bitgo-beta/sdk-coin-atom": "1.0.1-beta.111",
"@bitgo-beta/sdk-coin-bld": "^1.0.1-beta.50",
"@bitgo-beta/sdk-coin-hash": "^1.0.1-beta.48",
"@bitgo-beta/sdk-coin-injective": "^1.1.3-beta.42",
"@bitgo-beta/sdk-coin-sei": "^1.0.1-beta.45",
"@bitgo-beta/sdk-coin-tia": "^1.0.0-beta.54",
"@bitgo/abstract-utxo": "3.7.0",
"@bitgo/sdk-api": "1.13.2",
"@bitgo/sdk-coin-ada": "2.6.2",
"@bitgo/sdk-coin-avaxc": "2.6.2",
"@bitgo/sdk-coin-bch": "1.5.2",
"@bitgo/sdk-coin-bcha": "1.7.2",
"@bitgo-beta/sdk-coin-bld": "^1.0.1-beta.50",
"@bitgo/sdk-coin-bsv": "1.5.2",
"@bitgo/sdk-coin-btc": "1.7.2",
"@bitgo/sdk-coin-btg": "1.5.2",
Expand All @@ -28,19 +31,17 @@
"@bitgo/sdk-coin-eos": "1.5.2",
"@bitgo/sdk-coin-eth": "4.7.2",
"@bitgo/sdk-coin-ethw": "1.5.2",
"@bitgo-beta/sdk-coin-hash": "^1.0.1-beta.48",
"@bitgo-beta/sdk-coin-injective": "^1.1.3-beta.42",
"@bitgo/sdk-coin-ltc": "2.2.2",
"@bitgo/sdk-coin-near": "1.6.2",
"@bitgo/sdk-coin-osmo": "1.6.2",
"@bitgo/sdk-coin-polygon": "1.7.2",
"@bitgo-beta/sdk-coin-sei": "^1.0.1-beta.45",
"@bitgo/sdk-coin-sol": "2.9.0",
"@bitgo-beta/sdk-coin-tia": "^1.0.0-beta.54",
"@bitgo/sdk-coin-trx": "1.10.2",
"@bitgo/sdk-coin-xlm": "2.3.2",
"@bitgo/sdk-coin-xrp": "1.7.2",
"@bitgo/sdk-coin-zec": "1.5.2",
"@bitgo/sdk-coin-zeta": "^1.2.3",
"@bitgo/utxo-lib": "9.5.2",
"@ethereumjs/common": "2.6.5",
"@lottiefiles/react-lottie-player": "3.4.9",
"clsx": "1.2.1",
Expand Down
1 change: 1 addition & 0 deletions scripts/build-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const coins = [
'bld',
'hash',
'sei',
'zeta',
];

const paths = fs
Expand Down
15 changes: 14 additions & 1 deletion src/components/CryptocurrencyIcon/CryptocurrencyIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from 'clsx';
export interface CryptocurrencyIconProps {
Name: 'ada' | 'atom' | 'avax' | 'bch' | 'bsv' | 'btc' | 'btg' | 'dash' | 'doge' | 'dot' | 'eos' | 'eth' | 'ltc' | 'near' | 'osmo' | 'tia' | 'injective' | 'bld' | 'hash' | 'sei' | 'polygon' | 'sol' | 'trx' | 'xec' | 'xlm' | 'xrp' | 'zec';
Name: 'ada' | 'atom' | 'avax' | 'bch' | 'bsv' | 'btc' | 'btg' | 'dash' | 'doge' | 'dot' | 'eos' | 'eth' | 'ltc' | 'near' | 'osmo' | 'tia' | 'injective' | 'bld' | 'hash' | 'sei' | 'zeta' | 'polygon' | 'sol' | 'trx' | 'xec' | 'xlm' | 'xrp' | 'zec';
Size: 'small' | 'medium' | 'large';
}

Expand Down Expand Up @@ -988,6 +988,19 @@ case 'zec':
'tw-w-6 tw-h-6': Size === 'medium',
'tw-w-8 tw-h-8': Size === 'large',
})} {...hostProps}><g fill="none" fillRule="evenodd"><circle cx="16" cy="16" r="16" fill="#ECB244"/><path fill="#FFF" d="M15.096 19.846h6.297v3.35h-3.875c.064.958.097 1.847.161 2.804h-3.261v-2.77h-3.876c0-1.093-.129-2.187.065-3.213.097-.547.678-1.026 1.033-1.504a462.137 462.137 0 013.714-4.581c.485-.582.969-1.129 1.518-1.778h-6.04v-3.35h3.586V6h3.132v2.735h3.908c0 1.128.129 2.222-.065 3.248-.097.547-.678 1.026-1.065 1.504a462.138 462.138 0 01-3.714 4.581 37.083 37.083 0 01-1.518 1.778z" fillRule="nonzero"/></g></svg>;
case 'zeta':
return <svg
xmlns="http://www.w3.org/2000/svg"
width="237.333"
height="237.333"
version="1"
viewBox="0 0 178 178"
>
<path
d="M790 1774c-176-33-285-73-390-144-188-127-319-316-376-540-25-102-26-286 0-394 78-335 328-586 666-672 102-25 286-26 394 0 335 78 586 328 672 666 25 102 26 286 0 394-77 330-320 579-651 667-68 19-263 33-315 23zm468-691l-3-258-67-3-67-3-3 140-3 140-190-162C712 754 659 699 642 642c-23-77-40-72 233-72h244l3 63 3 62h130l3-127 3-128H490v89c0 112 24 193 79 266 22 29 133 133 246 229 113 97 205 178 205 181s-88 5-195 5H631l-3-62-3-63-67-3-68-3v261h770l-2-257z"
transform="matrix(.1 0 0 -.1 0 178)"
></path>
</svg>;
default:
return null;
}
Expand Down
2 changes: 2 additions & 0 deletions src/containers/NonBitGoRecoveryCoin/NonBitGoRecoveryCoin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,8 @@ function Form() {
case 'thash':
case 'sei':
case 'tsei':
case 'zeta':
case 'tzeta':
return (
<CosmosForm
key={coin}
Expand Down
14 changes: 14 additions & 0 deletions src/helpers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ export const allCoinMetas = {
Icon: 'sei',
value: 'sei',
},
zeta: {
Title: 'ZETA',
Description: 'Zeta',
Icon: 'zeta',
value: 'zeta',
},
tbtc: {
Title: 'TBTC',
Description: 'Testnet Bitcoin',
Expand Down Expand Up @@ -315,6 +321,12 @@ export const allCoinMetas = {
Icon: 'sei',
value: 'tsei',
},
tzeta: {
Title: 'TZETA',
Description: 'Zeta Testnet',
Icon: 'zeta',
value: 'tzeta',
},
} as const;

export const buildUnsignedSweepCoins: Record<
Expand Down Expand Up @@ -391,6 +403,7 @@ export const nonBitgoRecoveryCoins: Record<BitgoEnv, readonly CoinMetadata[]> =
allCoinMetas.bld,
allCoinMetas.hash,
allCoinMetas.sei,
allCoinMetas.zeta,
] as const,
test: [
allCoinMetas.tbtc,
Expand All @@ -414,6 +427,7 @@ export const nonBitgoRecoveryCoins: Record<BitgoEnv, readonly CoinMetadata[]> =
allCoinMetas.tbld,
allCoinMetas.thash,
allCoinMetas.tsei,
allCoinMetas.tzeta,
] as const,
};

Expand Down

0 comments on commit 59e6425

Please sign in to comment.