diff --git a/packages/synapse-interface/CHANGELOG.md b/packages/synapse-interface/CHANGELOG.md index 7b39baddcb..799822118e 100644 --- a/packages/synapse-interface/CHANGELOG.md +++ b/packages/synapse-interface/CHANGELOG.md @@ -3,6 +3,99 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.9.8](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.9.7...@synapsecns/synapse-interface@0.9.8) (2024-03-14) + +**Note:** Version bump only for package @synapsecns/synapse-interface + + + + + +## [0.9.7](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.9.6...@synapsecns/synapse-interface@0.9.7) (2024-03-14) + +**Note:** Version bump only for package @synapsecns/synapse-interface + + + + + +## [0.9.6](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.9.5...@synapsecns/synapse-interface@0.9.6) (2024-03-14) + +**Note:** Version bump only for package @synapsecns/synapse-interface + + + + + +## [0.9.5](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.9.4...@synapsecns/synapse-interface@0.9.5) (2024-03-14) + + +### Bug Fixes + +* **synapse-interface:** fixes explorer images ([#2292](https://github.com/synapsecns/sanguine/issues/2292)) ([98f48b1](https://github.com/synapsecns/sanguine/commit/98f48b165f45b2a9b8f291e3020872029ae20abb)) + + + + + +## [0.9.4](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.9.3...@synapsecns/synapse-interface@0.9.4) (2024-03-14) + + +### Bug Fixes + +* **synapse-interface:** deprecate unused dependencies ([#2287](https://github.com/synapsecns/sanguine/issues/2287)) ([e14071b](https://github.com/synapsecns/sanguine/commit/e14071bf1014050036b5e2e0858aa1e84aad2e18)) + + + + + +## [0.9.3](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.9.2...@synapsecns/synapse-interface@0.9.3) (2024-03-14) + +**Note:** Version bump only for package @synapsecns/synapse-interface + + + + + +## [0.9.2](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.9.1...@synapsecns/synapse-interface@0.9.2) (2024-03-14) + +**Note:** Version bump only for package @synapsecns/synapse-interface + + + + + +## [0.9.1](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.9.0...@synapsecns/synapse-interface@0.9.1) (2024-03-14) + +**Note:** Version bump only for package @synapsecns/synapse-interface + + + + + + +# [0.9.0](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.8.0...@synapsecns/synapse-interface@0.9.0) (2024-03-13) + + +### Features + +* **synapse-interface:** use both rebate displays in bridge card ([#2276](https://github.com/synapsecns/sanguine/issues/2276)) ([45fbfdc](https://github.com/synapsecns/sanguine/commit/45fbfdc245647b8db87b889e252fa4aece49f501)) + + + + + +# [0.8.0](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.7.1...@synapsecns/synapse-interface@0.8.0) (2024-03-13) + + +### Features + +* **synapse-interface:** ecotone and metis upgrade downtime, remove eth dencun ([#2274](https://github.com/synapsecns/sanguine/issues/2274)) ([f527ce5](https://github.com/synapsecns/sanguine/commit/f527ce53c883672232f43da90f0614a8a580442a)) + + + + + ## [0.7.1](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.7.0...@synapsecns/synapse-interface@0.7.1) (2024-03-13) **Note:** Version bump only for package @synapsecns/synapse-interface @@ -11,6 +104,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline + # [0.7.0](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.6.2...@synapsecns/synapse-interface@0.7.0) (2024-03-13) diff --git a/packages/synapse-interface/assets/chains/arbitrum.svg b/packages/synapse-interface/assets/chains/arbitrum.svg index f098c0d248..cb285a937a 100644 --- a/packages/synapse-interface/assets/chains/arbitrum.svg +++ b/packages/synapse-interface/assets/chains/arbitrum.svg @@ -1,8 +1 @@ - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/aurora.svg b/packages/synapse-interface/assets/chains/aurora.svg index f3a1875f12..5b5441b3dd 100644 --- a/packages/synapse-interface/assets/chains/aurora.svg +++ b/packages/synapse-interface/assets/chains/aurora.svg @@ -1,10 +1 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/avalanche.svg b/packages/synapse-interface/assets/chains/avalanche.svg index ab95c44cab..5695785b66 100644 --- a/packages/synapse-interface/assets/chains/avalanche.svg +++ b/packages/synapse-interface/assets/chains/avalanche.svg @@ -1,4 +1 @@ - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/base.svg b/packages/synapse-interface/assets/chains/base.svg index 75100d4bd2..5dd1e67af0 100644 --- a/packages/synapse-interface/assets/chains/base.svg +++ b/packages/synapse-interface/assets/chains/base.svg @@ -1,10 +1 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/bnb.svg b/packages/synapse-interface/assets/chains/bnb.svg index 3af90289df..4279646a3d 100644 --- a/packages/synapse-interface/assets/chains/bnb.svg +++ b/packages/synapse-interface/assets/chains/bnb.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/boba.svg b/packages/synapse-interface/assets/chains/boba.svg index a1177ea681..6f3f19fdfa 100644 --- a/packages/synapse-interface/assets/chains/boba.svg +++ b/packages/synapse-interface/assets/chains/boba.svg @@ -1,11 +1 @@ - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/canto.svg b/packages/synapse-interface/assets/chains/canto.svg index 9312b7c0cf..20e0fe2177 100644 --- a/packages/synapse-interface/assets/chains/canto.svg +++ b/packages/synapse-interface/assets/chains/canto.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/cronos.svg b/packages/synapse-interface/assets/chains/cronos.svg index 289246bb8b..f2c429fc7f 100644 --- a/packages/synapse-interface/assets/chains/cronos.svg +++ b/packages/synapse-interface/assets/chains/cronos.svg @@ -1,5 +1 @@ - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/dfk.svg b/packages/synapse-interface/assets/chains/dfk.svg index ccc5869eb9..7daf4cc71e 100644 --- a/packages/synapse-interface/assets/chains/dfk.svg +++ b/packages/synapse-interface/assets/chains/dfk.svg @@ -1,16 +1 @@ - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/dogechain.svg b/packages/synapse-interface/assets/chains/dogechain.svg index 29058988eb..9c8a52c0cb 100644 --- a/packages/synapse-interface/assets/chains/dogechain.svg +++ b/packages/synapse-interface/assets/chains/dogechain.svg @@ -1,9 +1 @@ - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/ethereum.svg b/packages/synapse-interface/assets/chains/ethereum.svg index 0b13331176..407dcd3072 100644 --- a/packages/synapse-interface/assets/chains/ethereum.svg +++ b/packages/synapse-interface/assets/chains/ethereum.svg @@ -1,9 +1 @@ - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/fantom.svg b/packages/synapse-interface/assets/chains/fantom.svg index 47788393d7..3e23ff5c0e 100644 --- a/packages/synapse-interface/assets/chains/fantom.svg +++ b/packages/synapse-interface/assets/chains/fantom.svg @@ -1,4 +1 @@ - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/harmony.svg b/packages/synapse-interface/assets/chains/harmony.svg index 1ed4fa47b6..4ce9dc2a07 100644 --- a/packages/synapse-interface/assets/chains/harmony.svg +++ b/packages/synapse-interface/assets/chains/harmony.svg @@ -1,10 +1 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/klaytn.svg b/packages/synapse-interface/assets/chains/klaytn.svg index 91a75d69f2..88efdb79b5 100644 --- a/packages/synapse-interface/assets/chains/klaytn.svg +++ b/packages/synapse-interface/assets/chains/klaytn.svg @@ -1,30 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/metis.svg b/packages/synapse-interface/assets/chains/metis.svg index a6deadf00d..fd1342a2c0 100644 --- a/packages/synapse-interface/assets/chains/metis.svg +++ b/packages/synapse-interface/assets/chains/metis.svg @@ -1,3 +1 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/moonbeam.svg b/packages/synapse-interface/assets/chains/moonbeam.svg index dc4a6cb7a1..0cbeda36a7 100644 --- a/packages/synapse-interface/assets/chains/moonbeam.svg +++ b/packages/synapse-interface/assets/chains/moonbeam.svg @@ -1,17 +1 @@ - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/moonriver.svg b/packages/synapse-interface/assets/chains/moonriver.svg index b9c79fc2e1..07cf4ddfcd 100644 --- a/packages/synapse-interface/assets/chains/moonriver.svg +++ b/packages/synapse-interface/assets/chains/moonriver.svg @@ -1,19 +1 @@ - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/optimism.svg b/packages/synapse-interface/assets/chains/optimism.svg index 731740a446..7378f33b2b 100644 --- a/packages/synapse-interface/assets/chains/optimism.svg +++ b/packages/synapse-interface/assets/chains/optimism.svg @@ -1,5 +1 @@ - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/chains/polygon.svg b/packages/synapse-interface/assets/chains/polygon.svg index bd44d1a402..879ae5a82c 100644 --- a/packages/synapse-interface/assets/chains/polygon.svg +++ b/packages/synapse-interface/assets/chains/polygon.svg @@ -1,10 +1 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/arbitrum.svg b/packages/synapse-interface/assets/explorer/arbiscan.svg similarity index 100% rename from packages/synapse-interface/assets/explorer/arbitrum.svg rename to packages/synapse-interface/assets/explorer/arbiscan.svg diff --git a/packages/synapse-interface/assets/explorer/aurora.svg b/packages/synapse-interface/assets/explorer/aurora.svg deleted file mode 100644 index 3ea0ebae01..0000000000 --- a/packages/synapse-interface/assets/explorer/aurora.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/avalanche.svg b/packages/synapse-interface/assets/explorer/avalanche.svg deleted file mode 100644 index fc5ca97e5d..0000000000 --- a/packages/synapse-interface/assets/explorer/avalanche.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/blast.svg b/packages/synapse-interface/assets/explorer/blast.svg deleted file mode 100644 index 5df8a7f017..0000000000 --- a/packages/synapse-interface/assets/explorer/blast.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/packages/synapse-interface/assets/explorer/boba.svg b/packages/synapse-interface/assets/explorer/boba.svg deleted file mode 100644 index 6b65299d1d..0000000000 --- a/packages/synapse-interface/assets/explorer/boba.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/bscscan.svg b/packages/synapse-interface/assets/explorer/bscscan.svg index 9409a9c45c..da6febeaf3 100644 --- a/packages/synapse-interface/assets/explorer/bscscan.svg +++ b/packages/synapse-interface/assets/explorer/bscscan.svg @@ -1,3 +1,4 @@ - - - \ No newline at end of file + + + + diff --git a/packages/synapse-interface/assets/explorer/canto.svg b/packages/synapse-interface/assets/explorer/canto.svg deleted file mode 100644 index bc3c2a5797..0000000000 --- a/packages/synapse-interface/assets/explorer/canto.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/cronos.svg b/packages/synapse-interface/assets/explorer/cronos.svg deleted file mode 100644 index e3168f2003..0000000000 --- a/packages/synapse-interface/assets/explorer/cronos.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/dfk-chain.svg b/packages/synapse-interface/assets/explorer/dfk-chain.svg deleted file mode 100644 index 6f9c65efe0..0000000000 --- a/packages/synapse-interface/assets/explorer/dfk-chain.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/dogecoin.svg b/packages/synapse-interface/assets/explorer/dogecoin.svg deleted file mode 100644 index 25cb7d44b0..0000000000 --- a/packages/synapse-interface/assets/explorer/dogecoin.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/fantom.svg b/packages/synapse-interface/assets/explorer/fantom.svg deleted file mode 100644 index cbe18b70dd..0000000000 --- a/packages/synapse-interface/assets/explorer/fantom.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/ftmscan.svg b/packages/synapse-interface/assets/explorer/ftmscan.svg new file mode 100644 index 0000000000..499bfea387 --- /dev/null +++ b/packages/synapse-interface/assets/explorer/ftmscan.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/synapse-interface/assets/explorer/harmony.svg b/packages/synapse-interface/assets/explorer/harmony.svg deleted file mode 100644 index a08908db08..0000000000 --- a/packages/synapse-interface/assets/explorer/harmony.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/klaytn.svg b/packages/synapse-interface/assets/explorer/klaytn.svg deleted file mode 100644 index 7442140766..0000000000 --- a/packages/synapse-interface/assets/explorer/klaytn.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/metis.svg b/packages/synapse-interface/assets/explorer/metis.svg deleted file mode 100644 index a6deadf00d..0000000000 --- a/packages/synapse-interface/assets/explorer/metis.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/moonbeam.svg b/packages/synapse-interface/assets/explorer/moonbeam.svg deleted file mode 100644 index 04cfc82fbc..0000000000 --- a/packages/synapse-interface/assets/explorer/moonbeam.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/moonriver.svg b/packages/synapse-interface/assets/explorer/moonriver.svg deleted file mode 100644 index 0a6f6ee270..0000000000 --- a/packages/synapse-interface/assets/explorer/moonriver.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/optimism.svg b/packages/synapse-interface/assets/explorer/optimism.svg deleted file mode 100644 index b818976a23..0000000000 --- a/packages/synapse-interface/assets/explorer/optimism.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/polygon.svg b/packages/synapse-interface/assets/explorer/polygon.svg deleted file mode 100644 index 5ac59821dc..0000000000 --- a/packages/synapse-interface/assets/explorer/polygon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/synapse-interface/assets/explorer/snowscan.svg b/packages/synapse-interface/assets/explorer/snowscan.svg new file mode 100644 index 0000000000..a20a66a2ff --- /dev/null +++ b/packages/synapse-interface/assets/explorer/snowscan.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/synapse-interface/assets/icons/ageur.svg b/packages/synapse-interface/assets/icons/ageur.svg index c5116082ff..e48ff825bc 100644 --- a/packages/synapse-interface/assets/icons/ageur.svg +++ b/packages/synapse-interface/assets/icons/ageur.svg @@ -1,11 +1 @@ - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/avax.svg b/packages/synapse-interface/assets/icons/avax.svg index ab95c44cab..5695785b66 100644 --- a/packages/synapse-interface/assets/icons/avax.svg +++ b/packages/synapse-interface/assets/icons/avax.svg @@ -1,4 +1 @@ - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/avweth.svg b/packages/synapse-interface/assets/icons/avweth.svg index a34de53076..8e9d055972 100644 --- a/packages/synapse-interface/assets/icons/avweth.svg +++ b/packages/synapse-interface/assets/icons/avweth.svg @@ -1,22 +1 @@ - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/btc.svg b/packages/synapse-interface/assets/icons/btc.svg index 08243771aa..a10e2bcc2c 100644 --- a/packages/synapse-interface/assets/icons/btc.svg +++ b/packages/synapse-interface/assets/icons/btc.svg @@ -1,11 +1 @@ - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/busd.svg b/packages/synapse-interface/assets/icons/busd.svg index 86b599151a..939021a69d 100644 --- a/packages/synapse-interface/assets/icons/busd.svg +++ b/packages/synapse-interface/assets/icons/busd.svg @@ -1,7 +1 @@ - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/crvusd.svg b/packages/synapse-interface/assets/icons/crvusd.svg index ba287ce36c..de40a549fc 100644 --- a/packages/synapse-interface/assets/icons/crvusd.svg +++ b/packages/synapse-interface/assets/icons/crvusd.svg @@ -1,103 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/dai.svg b/packages/synapse-interface/assets/icons/dai.svg index aa054bc7ef..41d6d21513 100644 --- a/packages/synapse-interface/assets/icons/dai.svg +++ b/packages/synapse-interface/assets/icons/dai.svg @@ -1,4 +1 @@ - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/dog.svg b/packages/synapse-interface/assets/icons/dog.svg index 5974c3c474..1d7640718a 100644 --- a/packages/synapse-interface/assets/icons/dog.svg +++ b/packages/synapse-interface/assets/icons/dog.svg @@ -1,14 +1 @@ - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/eth.svg b/packages/synapse-interface/assets/icons/eth.svg index 99d1e3ef08..e9dcc7f0c3 100644 --- a/packages/synapse-interface/assets/icons/eth.svg +++ b/packages/synapse-interface/assets/icons/eth.svg @@ -1,17 +1 @@ - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/frax.svg b/packages/synapse-interface/assets/icons/frax.svg index 7dac7ad9d4..cf8c89f20d 100644 --- a/packages/synapse-interface/assets/icons/frax.svg +++ b/packages/synapse-interface/assets/icons/frax.svg @@ -1,5 +1 @@ - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/ftm.svg b/packages/synapse-interface/assets/icons/ftm.svg index c0ee1877b6..81b17f14c6 100644 --- a/packages/synapse-interface/assets/icons/ftm.svg +++ b/packages/synapse-interface/assets/icons/ftm.svg @@ -1,4 +1 @@ - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/fusdt.svg b/packages/synapse-interface/assets/icons/fusdt.svg index 38005cadd9..5d813d5824 100644 --- a/packages/synapse-interface/assets/icons/fusdt.svg +++ b/packages/synapse-interface/assets/icons/fusdt.svg @@ -1,25 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/gmx.svg b/packages/synapse-interface/assets/icons/gmx.svg index d76d010222..c1534ad171 100644 --- a/packages/synapse-interface/assets/icons/gmx.svg +++ b/packages/synapse-interface/assets/icons/gmx.svg @@ -1,15 +1 @@ - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/gohm.svg b/packages/synapse-interface/assets/icons/gohm.svg index c719c8685e..7e4842d855 100644 --- a/packages/synapse-interface/assets/icons/gohm.svg +++ b/packages/synapse-interface/assets/icons/gohm.svg @@ -1,21 +1 @@ - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/h2o.svg b/packages/synapse-interface/assets/icons/h2o.svg index 4b72fb689e..a2935082de 100644 --- a/packages/synapse-interface/assets/icons/h2o.svg +++ b/packages/synapse-interface/assets/icons/h2o.svg @@ -1,15 +1 @@ - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/highstreet.svg b/packages/synapse-interface/assets/icons/highstreet.svg index 37e63d0782..eb53b0ea3e 100644 --- a/packages/synapse-interface/assets/icons/highstreet.svg +++ b/packages/synapse-interface/assets/icons/highstreet.svg @@ -1,11 +1 @@ - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/hyperjump.svg b/packages/synapse-interface/assets/icons/hyperjump.svg index 09635e9432..5f8ca538f5 100644 --- a/packages/synapse-interface/assets/icons/hyperjump.svg +++ b/packages/synapse-interface/assets/icons/hyperjump.svg @@ -1,14 +1 @@ - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/jewel.svg b/packages/synapse-interface/assets/icons/jewel.svg index ddb6309c7e..7b6cd90f18 100644 --- a/packages/synapse-interface/assets/icons/jewel.svg +++ b/packages/synapse-interface/assets/icons/jewel.svg @@ -1,14 +1 @@ - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/klay.svg b/packages/synapse-interface/assets/icons/klay.svg index 91a75d69f2..552e0a6e50 100644 --- a/packages/synapse-interface/assets/icons/klay.svg +++ b/packages/synapse-interface/assets/icons/klay.svg @@ -1,30 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/packages/synapse-interface/assets/icons/l2dao.svg b/packages/synapse-interface/assets/icons/l2dao.svg index b6f532c8f5..22175d2cb7 100644 --- a/packages/synapse-interface/assets/icons/l2dao.svg +++ b/packages/synapse-interface/assets/icons/l2dao.svg @@ -1,47 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/link.svg b/packages/synapse-interface/assets/icons/link.svg index c4b8f61c01..cc848c331c 100644 --- a/packages/synapse-interface/assets/icons/link.svg +++ b/packages/synapse-interface/assets/icons/link.svg @@ -1,10 +1 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/matic.svg b/packages/synapse-interface/assets/icons/matic.svg index c4eee4dc83..879ae5a82c 100644 --- a/packages/synapse-interface/assets/icons/matic.svg +++ b/packages/synapse-interface/assets/icons/matic.svg @@ -1,10 +1 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/metamask.svg b/packages/synapse-interface/assets/icons/metamask.svg index 65b3f54416..fa6d5b322b 100644 --- a/packages/synapse-interface/assets/icons/metamask.svg +++ b/packages/synapse-interface/assets/icons/metamask.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/mim.svg b/packages/synapse-interface/assets/icons/mim.svg index 4ae938c2ff..6397e92bae 100644 --- a/packages/synapse-interface/assets/icons/mim.svg +++ b/packages/synapse-interface/assets/icons/mim.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/movr.svg b/packages/synapse-interface/assets/icons/movr.svg index 9d5d25bf0b..07cf4ddfcd 100644 --- a/packages/synapse-interface/assets/icons/movr.svg +++ b/packages/synapse-interface/assets/icons/movr.svg @@ -1,19 +1 @@ - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/neth.svg b/packages/synapse-interface/assets/icons/neth.svg index 8357f4993e..913868f284 100644 --- a/packages/synapse-interface/assets/icons/neth.svg +++ b/packages/synapse-interface/assets/icons/neth.svg @@ -1,22 +1 @@ - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/newo.svg b/packages/synapse-interface/assets/icons/newo.svg index e72e30525f..444ed2965f 100644 --- a/packages/synapse-interface/assets/icons/newo.svg +++ b/packages/synapse-interface/assets/icons/newo.svg @@ -1,106 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/nfd.svg b/packages/synapse-interface/assets/icons/nfd.svg index ccee410cb8..7534a91235 100644 --- a/packages/synapse-interface/assets/icons/nfd.svg +++ b/packages/synapse-interface/assets/icons/nfd.svg @@ -1,14 +1 @@ - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/note.svg b/packages/synapse-interface/assets/icons/note.svg index 47f845abd6..c1be5c5dc9 100644 --- a/packages/synapse-interface/assets/icons/note.svg +++ b/packages/synapse-interface/assets/icons/note.svg @@ -1,19 +1 @@ - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/nusd.svg b/packages/synapse-interface/assets/icons/nusd.svg index bff0657146..191a497c9e 100644 --- a/packages/synapse-interface/assets/icons/nusd.svg +++ b/packages/synapse-interface/assets/icons/nusd.svg @@ -1,16 +1 @@ - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/op.svg b/packages/synapse-interface/assets/icons/op.svg index fdc2a70956..bb5f2a1511 100644 --- a/packages/synapse-interface/assets/icons/op.svg +++ b/packages/synapse-interface/assets/icons/op.svg @@ -1,5 +1 @@ - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/pepe.svg b/packages/synapse-interface/assets/icons/pepe.svg index 48f3478f53..f08be7d1d6 100644 --- a/packages/synapse-interface/assets/icons/pepe.svg +++ b/packages/synapse-interface/assets/icons/pepe.svg @@ -1,14 +1 @@ - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/pls.svg b/packages/synapse-interface/assets/icons/pls.svg index 245aaaa6a1..fccdbcd2ca 100644 --- a/packages/synapse-interface/assets/icons/pls.svg +++ b/packages/synapse-interface/assets/icons/pls.svg @@ -1,90 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/sdt.svg b/packages/synapse-interface/assets/icons/sdt.svg index 6f875ba2c9..0d0824c16c 100644 --- a/packages/synapse-interface/assets/icons/sdt.svg +++ b/packages/synapse-interface/assets/icons/sdt.svg @@ -1,13 +1 @@ - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/sfi.svg b/packages/synapse-interface/assets/icons/sfi.svg index 1cb6836508..e1a8cd0ad2 100644 --- a/packages/synapse-interface/assets/icons/sfi.svg +++ b/packages/synapse-interface/assets/icons/sfi.svg @@ -1,4 +1 @@ - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/solar.svg b/packages/synapse-interface/assets/icons/solar.svg index 94e19c4a88..ed386e2dfa 100644 --- a/packages/synapse-interface/assets/icons/solar.svg +++ b/packages/synapse-interface/assets/icons/solar.svg @@ -1,44 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/susd.svg b/packages/synapse-interface/assets/icons/susd.svg index 8794225fcd..924acb5405 100644 --- a/packages/synapse-interface/assets/icons/susd.svg +++ b/packages/synapse-interface/assets/icons/susd.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/sushi.svg b/packages/synapse-interface/assets/icons/sushi.svg index dc5a7bcf1b..bb4bc618fe 100644 --- a/packages/synapse-interface/assets/icons/sushi.svg +++ b/packages/synapse-interface/assets/icons/sushi.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/syn.svg b/packages/synapse-interface/assets/icons/syn.svg index d4ef052e76..f7a230124d 100644 --- a/packages/synapse-interface/assets/icons/syn.svg +++ b/packages/synapse-interface/assets/icons/syn.svg @@ -1,50 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/unidex.svg b/packages/synapse-interface/assets/icons/unidex.svg index 5e242faf0a..cf432ca520 100644 --- a/packages/synapse-interface/assets/icons/unidex.svg +++ b/packages/synapse-interface/assets/icons/unidex.svg @@ -1,15 +1 @@ - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/usdc.svg b/packages/synapse-interface/assets/icons/usdc.svg index 2a3640ffd6..0cf54945bd 100644 --- a/packages/synapse-interface/assets/icons/usdc.svg +++ b/packages/synapse-interface/assets/icons/usdc.svg @@ -1,12 +1 @@ - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/usdt.svg b/packages/synapse-interface/assets/icons/usdt.svg index 8da7a84975..1ea97592e0 100644 --- a/packages/synapse-interface/assets/icons/usdt.svg +++ b/packages/synapse-interface/assets/icons/usdt.svg @@ -1,4 +1 @@ - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/vsta.svg b/packages/synapse-interface/assets/icons/vsta.svg index 19f623e8ff..5b2b1ac3c2 100644 --- a/packages/synapse-interface/assets/icons/vsta.svg +++ b/packages/synapse-interface/assets/icons/vsta.svg @@ -1,26 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/wbtc.svg b/packages/synapse-interface/assets/icons/wbtc.svg index 2f8c9b1c02..7f9d25c59b 100644 --- a/packages/synapse-interface/assets/icons/wbtc.svg +++ b/packages/synapse-interface/assets/icons/wbtc.svg @@ -1,9 +1 @@ - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/assets/icons/weth.svg b/packages/synapse-interface/assets/icons/weth.svg index 2445cee472..0dec30bb5f 100644 --- a/packages/synapse-interface/assets/icons/weth.svg +++ b/packages/synapse-interface/assets/icons/weth.svg @@ -1,17 +1 @@ - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx b/packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx index 42dc33dc97..377bcfadcf 100644 --- a/packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx +++ b/packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx @@ -1,7 +1,10 @@ import { useState, useEffect } from 'react' +import { getCountdownTimeStatus } from './EventCountdownProgressBar' /** - * Reusable Annoucement Banner with custom Start/End Time + * Reusable automated Announcement Banner with custom Start/End Time + * Will automatically appear after Start time + * Will automatically disappear after End time * @param bannerId: store in $MMDDYYYY-$BANNER_NAME format (e.g 03132024-ETH-DENCUN) * @param bannerContents: contents to display in banner * @param startDate: start date to show banner @@ -18,15 +21,9 @@ export const AnnouncementBanner = ({ startDate: Date endDate: Date }) => { + const { isStarted, isComplete } = getCountdownTimeStatus(startDate, endDate) const [hasMounted, setHasMounted] = useState(false) - const [showBanner, setShowBanner] = useState(false) - - const currentDate = new Date() - - const isStarted = - Math.floor(currentDate.getTime()) - Math.floor(startDate.getTime()) >= 0 - const isComplete = - Math.floor(currentDate.getTime()) - Math.floor(endDate.getTime()) >= 0 + const [showBanner, setShowBanner] = useState(true) useEffect(() => { setHasMounted(true) @@ -54,11 +51,11 @@ export const AnnouncementBanner = ({ } }, [showBanner, hasMounted]) - if (!showBanner || !hasMounted || isComplete) return null + if (!showBanner || !hasMounted || !isStarted || isComplete) return null return (
{ useIntervalTimer(60000) - const currentDate = new Date() - const currentTimeInSeconds = currentDate.getTime() / 1000 - const startTimeInSeconds = Math.floor(startDate.getTime() / 1000) - const endTimeInSeconds = Math.floor(endDate.getTime() / 1000) - const timeRemainingInSeconds = endTimeInSeconds - currentTimeInSeconds - const timeRemainingInMinutes = Math.ceil(timeRemainingInSeconds / 60) + const { totalTimeRemainingInMinutes, hoursRemaining, isComplete, isPending } = + getCountdownTimeStatus(startDate, endDate) - const isStarted = currentTimeInSeconds >= startTimeInSeconds - const isComplete = timeRemainingInSeconds <= 0 - const isPending = isStarted && !isComplete + const timeRemaining: string = + totalTimeRemainingInMinutes > 90 + ? `${hoursRemaining}h` + : `${totalTimeRemainingInMinutes}m` let status: 'idle' | 'pending' | 'complete' @@ -40,10 +36,10 @@ export const useEventCountdownProgressBar = ( EventCountdownProgressBar: ( ), } @@ -51,16 +47,16 @@ export const useEventCountdownProgressBar = ( export const EventCountdownProgressBar = ({ eventLabel, - startTime, - endTime, - status, + startDate, + endDate, timeRemaining, + status, }: { eventLabel: string - startTime: number - endTime: number + startDate: Date + endDate: Date + timeRemaining: string status: 'idle' | 'pending' | 'complete' - timeRemaining: number }) => { if (status === 'pending') { return ( @@ -73,14 +69,13 @@ export const EventCountdownProgressBar = ({ >
{eventLabel}
-
{timeRemaining}m remaining
+
{timeRemaining} remaining
@@ -89,3 +84,69 @@ export const EventCountdownProgressBar = ({ return null } } + +export const getCountdownTimeStatus = (startDate: Date, endDate: Date) => { + const currentDate = new Date() + + const { daysRemaining, hoursRemaining, minutesRemaining, secondsRemaining } = + calculateTimeUntilTarget(endDate) + + const currentTimeInSeconds = Math.floor(currentDate.getTime() / 1000) + + const startTimeInSeconds = Math.floor(startDate.getTime() / 1000) + const endTimeInSeconds = Math.floor(endDate.getTime() / 1000) + const totalTimeInSeconds = endTimeInSeconds - startTimeInSeconds + + const totalTimeElapsedInSeconds = currentTimeInSeconds - startTimeInSeconds + const totalTimeRemainingInSeconds = endTimeInSeconds - currentTimeInSeconds + const totalTimeRemainingInMinutes = Math.ceil( + totalTimeRemainingInSeconds / 60 + ) + + const isStarted = currentTimeInSeconds >= startTimeInSeconds + const isComplete = totalTimeRemainingInSeconds <= 0 + const isPending = isStarted && !isComplete + + return { + currentDate, + currentTimeInSeconds, + startTimeInSeconds, + endTimeInSeconds, + totalTimeInSeconds, + totalTimeElapsedInSeconds, + totalTimeRemainingInSeconds, + totalTimeRemainingInMinutes, + daysRemaining, + hoursRemaining, + minutesRemaining, + secondsRemaining, + isStarted, + isComplete, + isPending, + } +} + +const calculateTimeUntilTarget = (targetDate: Date) => { + const currentDate = new Date() + + const timeDifference = targetDate.getTime() - currentDate.getTime() + + const isComplete = timeDifference <= 0 + + const daysRemaining = Math.floor(timeDifference / (1000 * 60 * 60 * 24)) + const hoursRemaining = Math.floor( + (timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60) + ) + const minutesRemaining = Math.floor( + (timeDifference % (1000 * 60 * 60)) / (1000 * 60) + ) + const secondsRemaining = Math.floor((timeDifference % (1000 * 60)) / 1000) + + return { + daysRemaining, + hoursRemaining, + minutesRemaining, + secondsRemaining, + isComplete, + } +} diff --git a/packages/synapse-interface/components/Maintenance/Events/EcotoneForkUpgrade.tsx b/packages/synapse-interface/components/Maintenance/Events/EcotoneForkUpgrade.tsx new file mode 100644 index 0000000000..c2dd3dd355 --- /dev/null +++ b/packages/synapse-interface/components/Maintenance/Events/EcotoneForkUpgrade.tsx @@ -0,0 +1,93 @@ +import { AnnouncementBanner } from '../AnnouncementBanner' +import { WarningMessage } from '../../Warning' +import { useBridgeState } from '@/slices/bridge/hooks' +import { OPTIMISM, BASE } from '@/constants/chains/master' +import { + useEventCountdownProgressBar, + getCountdownTimeStatus, +} from '../EventCountdownProgressBar' +import { useIntervalTimer } from '@/utils/hooks/useIntervalTimer' + +/** + * Start: 25 min prior to Ecotone Fork Upgrade Time @ (March 14, 00:00 UTC) + * End: 25 min after start of Ecotone Fork Upgrade Time + */ +export const ECOTONE_FORK_BANNERS_START = new Date( + Date.UTC(2024, 2, 13, 23, 20, 0) +) +export const ECOTONE_FORK_START_DATE = new Date( + Date.UTC(2024, 2, 13, 23, 35, 0) +) +export const ECOTONE_FORK_END_DATE = new Date(Date.UTC(2024, 2, 14, 0, 25, 0)) + +export const EcotoneForkUpgradeBanner = () => { + const { isComplete } = getCountdownTimeStatus( + ECOTONE_FORK_BANNERS_START, + ECOTONE_FORK_END_DATE + ) + + useIntervalTimer(60000, isComplete) + + return ( + +
+ Optimism + Base Bridging will be paused 10 minutes ahead of Ecotone + (March 14, 00:00 UTC, 20:00 EST). +
+
Will be back online shortly following the network upgrade.
+ + } + startDate={ECOTONE_FORK_BANNERS_START} + endDate={ECOTONE_FORK_END_DATE} + /> + ) +} + +export const EcotoneForkWarningMessage = () => { + const { fromChainId, toChainId } = useBridgeState() + + const isChainOptimism = [fromChainId, toChainId].includes(OPTIMISM.id) + const isChainBase = [fromChainId, toChainId].includes(BASE.id) + + if (isChainOptimism || isChainBase) { + return ( + +

+ Optimism Chain and Base Chain bridging are paused until the + Ecotone Fork upgrade completes. +

+ + } + /> + ) + } else return null +} + +export const useEcotoneForkCountdownProgress = () => { + const { fromChainId, toChainId } = useBridgeState() + + const isChainOptimism = [fromChainId, toChainId].includes(OPTIMISM.id) + const isChainBase = [fromChainId, toChainId].includes(BASE.id) + + const { + isPending: isEcotoneForkUpgradePending, + EventCountdownProgressBar: EcotoneForkCountdownProgressBar, + } = useEventCountdownProgressBar( + 'Ecotone Fork upgrade in progress', + ECOTONE_FORK_START_DATE, + ECOTONE_FORK_END_DATE + ) + + return { + isEcotoneForkUpgradePending, + isCurrentChainDisabled: + (isChainOptimism || isChainBase) && isEcotoneForkUpgradePending, + EcotoneForkCountdownProgressBar: + isChainOptimism || isChainBase ? EcotoneForkCountdownProgressBar : null, + } +} diff --git a/packages/synapse-interface/components/Maintenance/Events/MetisUpgrade.tsx b/packages/synapse-interface/components/Maintenance/Events/MetisUpgrade.tsx new file mode 100644 index 0000000000..223a178bab --- /dev/null +++ b/packages/synapse-interface/components/Maintenance/Events/MetisUpgrade.tsx @@ -0,0 +1,90 @@ +import { AnnouncementBanner } from '../AnnouncementBanner' +import { WarningMessage } from '../../Warning' +import { useBridgeState } from '@/slices/bridge/hooks' +import { METIS } from '@/constants/chains/master' +import { useEventCountdownProgressBar } from '../EventCountdownProgressBar' +import { useIntervalTimer } from '@/utils/hooks/useIntervalTimer' +import { getCountdownTimeStatus } from '../EventCountdownProgressBar' + +/** + * Start: 30 min prior to Metis Chain Downtime @ (March 14, 02:00 UTC) + * End: 12 hours after start of Metis Chain Downtime + */ +export const METIS_DOWNTIME_BANNERS_START = new Date( + Date.UTC(2024, 2, 14, 1, 30, 0) +) +export const METIS_DOWNTIME_START_DATE = new Date( + Date.UTC(2024, 2, 14, 1, 45, 0) +) +export const METIS_DOWNTIME_END_DATE = new Date( + Date.UTC(2024, 2, 14, 16, 30, 0) +) + +export const MetisDowntimeBanner = () => { + const { isComplete } = getCountdownTimeStatus( + METIS_DOWNTIME_BANNERS_START, + METIS_DOWNTIME_END_DATE + ) + + useIntervalTimer(60000, isComplete) + + return ( + +
+ Metis Chain bridging will be paused 30 min ahead of the Metis + Upgrade (March 14, 02:00 UTC, 22:00 EST) +
+
and stay paused for ~12 hours.
+ + } + startDate={METIS_DOWNTIME_BANNERS_START} + endDate={METIS_DOWNTIME_END_DATE} + /> + ) +} + +export const MetisDowntimeWarningMessage = () => { + const { fromChainId, toChainId } = useBridgeState() + + const isChainMetis = [fromChainId, toChainId].includes(METIS.id) + + if (isChainMetis) { + return ( + +

+ Metis Chain bridging is paused until the Metis upgrade completes. +

+ + } + /> + ) + } else return null +} + +export const useMetisDowntimeCountdownProgress = () => { + const { fromChainId, toChainId } = useBridgeState() + + const isChainMetis = [fromChainId, toChainId].includes(METIS.id) + + const { + isPending: isMetisUpgradePending, + EventCountdownProgressBar: MetisUpgradeCountdownProgressBar, + } = useEventCountdownProgressBar( + 'Metis upgrade in progress', + METIS_DOWNTIME_START_DATE, + METIS_DOWNTIME_END_DATE + ) + + return { + isMetisUpgradePending, + isCurrentChainDisabled: isChainMetis && isMetisUpgradePending, + MetisUpgradeCountdownProgressBar: isChainMetis + ? MetisUpgradeCountdownProgressBar + : null, + } +} diff --git a/packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx b/packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx index d2c90fbe7b..955b932afc 100644 --- a/packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx +++ b/packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx @@ -1,36 +1,33 @@ import { memo } from 'react' -import { getTimeMinutesBeforeNow } from '@/utils/time' +import { getCountdownTimeStatus } from './EventCountdownProgressBar' /** * @param id unique identifier for progress bar instance * @param startTime start time in unix seconds * @param endTime end time in unix seconds - * @param status progress status */ export const LinearAnimatedProgressBar = memo( ({ id, - startTime, - endTime, - status, + startDate, + endDate, }: { id: string - startTime: number - endTime: number - status: 'idle' | 'pending' | 'complete' + startDate: Date + endDate: Date }) => { - const currentTime = Math.floor(getTimeMinutesBeforeNow(0)) - const elapsedTimeInSeconds = currentTime - startTime - const remainingTimeInSeconds = endTime - currentTime - const totalTimeInSeconds = endTime - startTime + const { + totalTimeInSeconds, + totalTimeElapsedInSeconds, + totalTimeRemainingInSeconds, + isComplete, + } = getCountdownTimeStatus(startDate, endDate) const percentElapsed = Math.floor( - (elapsedTimeInSeconds / totalTimeInSeconds) * 100 + (totalTimeElapsedInSeconds / totalTimeInSeconds) * 100 ) - const isComplete = status === 'complete' - - let duration = isComplete ? 0.5 : remainingTimeInSeconds + let duration = isComplete ? 0.5 : totalTimeRemainingInSeconds const synapsePurple = 'hsl(265deg 100% 75%)' const tailwindGreen400 = 'rgb(74 222 128)' @@ -40,7 +37,7 @@ export const LinearAnimatedProgressBar = memo( return ( { return (
- {/* */} - + + {/* */}
diff --git a/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx b/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx index c10e98aa6a..a9c9e0ec9c 100644 --- a/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx +++ b/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx @@ -5,7 +5,7 @@ import { EMPTY_BRIDGE_QUOTE, EMPTY_BRIDGE_QUOTE_ZERO } from '@/constants/bridge' import { RootState } from '@/store/store' import { useAccount, useNetwork, useSwitchNetwork } from 'wagmi' import { useEffect, useState } from 'react' -import { isAddress } from '@ethersproject/address' +import { isAddress } from 'viem' import { useConnectModal } from '@rainbow-me/rainbowkit' import { stringToBigInt } from '@/utils/bigint/format' diff --git a/packages/synapse-interface/components/icons/LandingIcons/FauxBridge.tsx b/packages/synapse-interface/components/icons/LandingIcons/FauxBridge.tsx new file mode 100644 index 0000000000..0dda9d2218 --- /dev/null +++ b/packages/synapse-interface/components/icons/LandingIcons/FauxBridge.tsx @@ -0,0 +1,270 @@ +// import PulseDot from '@/components/icons/PulseDot' +import { CHAINS_ARR } from '@/constants/chains' +import * as BRIDGEABLE from '@constants/tokens/bridgeable' +import { TOKENS_SORTED_BY_SWAPABLETYPE } from '@/constants/tokens' +// import * as WALLET_ICONS from '@components/WalletIcons' + +const cardStyle = + 'text-black dark:text-white bg-zinc-100 dark:bg-bgBase p-3 rounded-[.75rem] border border-zinc-200 dark:border-zinc-800 shadow-xl grid gap-4 max-w-sm' // dark:bg-zinc-900/95 +const sectionStyle = + 'relative bg-zinc-50 dark:bg-bgLight rounded-md px-2.5 py-3 grid gap-1 grid-cols-2 border border-zinc-300 dark:border-transparent' // dark:bg-zinc-800 +const buttonStyle = + 'rounded px-4 py-1 bg-zinc-100 dark:bg-separator border border-zinc-200 dark:border-transparent hover:border-zinc-400 hover:dark:border-zinc-500 h-fit mr-1 cursor-pointer focus:border-zinc-400 focus:dark:borer-zinc-500' // dark:bg-zinc-700 +const chainSelectStyle = + 'flex gap-2 items-center rounded px-2 py-1 bg-inherit border border-zinc-200 dark:border-transparent hover:border-zinc-400 hover:dark:border-zinc-500 active:opacity-70 focus:ring-1 focus:ring-zinc-500 focus:border-transparent' +const tokenSelectStyle = + 'flex gap-2 items-center rounded px-2 py-1.5 bg-inherit dark:bg-separator border border-zinc-200 dark:border-transparent hover:border-zinc-400 hover:dark:border-zinc-500 active:opacity-70 focus:ring-1 focus:ring-zinc-500 focus:border-transparent text-lg ' // dark:bg-zinc-700 +const inputWrapperStyle = + 'relative flex bg-white dark:bg-inherit border border-zinc-200 dark:border-separator rounded-md gap-0 p-1.5 col-span-2 gap-1.5 items-center' // dark:border-zinc-700 +const inputStyle = + 'bg-inherit border-none w-full p-1.5 text-xxl font-normal dark:font-medium tracking-wide rounded placeholder:text-secondary pointer-events-none' + +export default () => { + return ( +
+
+ + + +
+
+
+ + +
+ + + + ) +} + +const Select = ({ + type, + defaultName, + label, + data, +}: { + type: 'Chain' | 'Token' + defaultName?: string + label?: string + data: 'volume' | 'count' +}) => { + let button: string + let header: string + let value: number + let reduce: Function + let format: Function + switch (data) { + case 'volume': + button = `Volume by ${type}` + header = '$ vol.' + value = 1000000000 + Math.random() * 100000000 + reduce = () => (value *= 0.85) + format = () => { + if (value >= 1000000) return '$' + (value / 1000000).toFixed(1) + 'M' + let str = value.toFixed(0) + if (value >= 1000) { + for (let i = 3; i < str.length; i += 4) + str = `${str.slice(0, str.length - i)},${str.slice(-i)}` + return '$' + str + } + return '$' + value.toFixed(2) + } + break + case 'count': + button = `Txns by ${type}` + header = 'Txns' + value = 10000 + Math.random() * 1000 + reduce = () => (value *= 0.9) + format = () => { + let str = value.toFixed() + for (let i = 3; i < str.length; i += 4) + str = `${str.slice(0, str.length - i)},${str.slice(-i)}` + return str + } + break + } + + let arr + let key: string + let img: string + let name: string + + switch (type) { + case 'Chain': + arr = CHAINS_ARR + key = 'id' + img = 'chainImg' + name = 'name' + break + case 'Token': + arr = Object.values(BRIDGEABLE) + key = 'name' + img = 'icon' + name = 'symbol' + break + } + + const defaultItem = arr.find((a) => a[name] === defaultName) + + return ( +
+ +
+ + + + + {/* */} + + + + {arr.map((item, i) => { + reduce() + return ( + + + {/* */} + + ) + })} + + +
+ {type} + + {header} +
+ + {item[name]} + {format()}
+
+
+ ) +} + +const SupportedWallets = () => ( +
+
+
Supported wallets
+
    + {/* {Object.values(WALLET_ICONS).map((icon, i) => ( +
  • {icon({ width: 24, height: 24 })}
  • + ))} */} +
+
+ +
+) + +const HistoricMax = () => ( + +) + +const RightAngle = ({ height }) => { + const width = height / 2 + return ( + + + + ) +} + +const BridgeButton = () => ( + +) diff --git a/packages/synapse-interface/components/icons/LandingIcons/SynapseCircuit.tsx b/packages/synapse-interface/components/icons/LandingIcons/SynapseCircuit.tsx index eecbb38f5d..5b17274247 100644 --- a/packages/synapse-interface/components/icons/LandingIcons/SynapseCircuit.tsx +++ b/packages/synapse-interface/components/icons/LandingIcons/SynapseCircuit.tsx @@ -1,516 +1,32 @@ -export function SynapseCircuitSmall() { +export default function SynapseCircuit() { return ( - - - - - - - - - ) -} - -export function SynapseCircuit() { - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + ) } diff --git a/packages/synapse-interface/components/misc/ChainSlideOver.tsx b/packages/synapse-interface/components/misc/ChainSlideOver.tsx deleted file mode 100644 index 5d78af704e..0000000000 --- a/packages/synapse-interface/components/misc/ChainSlideOver.tsx +++ /dev/null @@ -1,157 +0,0 @@ -import { useCallback, useEffect, useState } from 'react' -import Fuse from 'fuse.js' -import { useKeyPress } from '@hooks/useKeyPress' -import * as CHAINS from '@constants/chains/master' -import { SelectSpecificNetworkButton } from '@components/buttons/SelectSpecificNetworkButton' -import SlideSearchBox from '@pages/bridge/SlideSearchBox' -import { DrawerButton } from '@components/buttons/DrawerButton' -import { useNetwork } from 'wagmi' -import { DisplayType } from '@/pages/bridge/DisplayType' -import { sortChains } from '@constants/chains' - -export const ChainSlideOver = ({ - isOrigin, - chains, - chainId, - onChangeChain, - setDisplayType, -}: { - isOrigin: boolean - chains: string[] - chainId: number - onChangeChain: (chainId: number, flip: boolean, type: 'from' | 'to') => void - setDisplayType: (v: DisplayType) => void -}) => { - const { chain } = useNetwork() - const [currentIdx, setCurrentIdx] = useState(-1) - const [searchStr, setSearchStr] = useState('') - const [networks, setNetworks] = useState([]) - const fuse = new Fuse(networks, { - includeScore: true, - threshold: 0.0, - keys: [ - { - name: 'name', - weight: 2, - }, - 'chainShortName', - 'chainId', - 'nativeCurrency', - ], - }) - // let networks: ChainInfo[] = [] - - const dataId = isOrigin - ? 'bridge-origin-chain-list' - : 'bridge-destination-chain-list' - - useEffect(() => { - let tempNetworks = [] - Object.values(CHAINS).map((chain) => { - if (isOrigin || (!isOrigin && chains?.includes(String(chain.id)))) { - tempNetworks.push(chain) - } - }) - tempNetworks = sortChains(tempNetworks) - if (searchStr?.length > 0) { - tempNetworks = fuse.search(searchStr).map((i) => i.item) - } - setNetworks(tempNetworks) - }, [chain, searchStr]) - - const escPressed = useKeyPress('Escape') - const arrowUp = useKeyPress('ArrowUp') - const arrowDown = useKeyPress('ArrowDown') - const enterPressed = useKeyPress('Enter') - - const onClose = useCallback(() => { - setCurrentIdx(-1) - setDisplayType(DisplayType.DEFAULT) - }, [setDisplayType]) - - const escFunc = () => { - if (escPressed) { - onClose() - } - } - const arrowDownFunc = () => { - const nextIdx = currentIdx + 1 - if (arrowDown && nextIdx < networks.length) { - setCurrentIdx(nextIdx) - } - } - - const arrowUpFunc = () => { - const nextIdx = currentIdx - 1 - if (arrowUp && -1 < nextIdx) { - setCurrentIdx(nextIdx) - } - } - - const enterPressedFunc = () => { - if (enterPressed && currentIdx > -1) { - const currentChain = networks[currentIdx] - onChangeChain(currentChain.chainId, false, isOrigin ? 'from' : 'to') - onClose() - } - } - const onSearch = (str: string) => { - setSearchStr(str) - setCurrentIdx(-1) - } - - useEffect(arrowDownFunc, [arrowDown]) - useEffect(escFunc, [escPressed]) - useEffect(arrowUpFunc, [arrowUp]) - useEffect(enterPressedFunc, [enterPressed]) - - return ( -
-
-
- - -
-
-
- {networks.map(({ id: mapChainId }, idx) => { - let onClickSpecificNetwork - if (chainId === mapChainId) { - onClickSpecificNetwork = () => console.log('INCEPTION') // I think this case is obsolete - } else { - onClickSpecificNetwork = () => { - onChangeChain(mapChainId, false, isOrigin ? 'from' : 'to') - onClose() - } - } - return ( - - ) - })} - {searchStr && ( -
- No other results found for{' '} - {searchStr}. -
- Want to see a chain supported on Synapse? Submit a request{' '} - - here - -
-
- )} -
-
- ) -} diff --git a/packages/synapse-interface/components/misc/TokenSlideOver.tsx b/packages/synapse-interface/components/misc/TokenSlideOver.tsx deleted file mode 100644 index dc301640ec..0000000000 --- a/packages/synapse-interface/components/misc/TokenSlideOver.tsx +++ /dev/null @@ -1,158 +0,0 @@ -import { useEffect, useState } from 'react' -import Fuse from 'fuse.js' -import { Zero } from '@ethersproject/constants' -import { useKeyPress } from '@hooks/useKeyPress' -import TokenMenuItem from '@pages/bridge/TokenMenuItem' -import SlideSearchBox from '@pages/bridge/SlideSearchBox' -import { DrawerButton } from '@components/buttons/DrawerButton' -import { sortTokens } from '@constants/tokens' - -import { Token } from '@/utils/types' -import { DisplayType } from '@/pages/bridge/DisplayType' - -export const TokenSlideOver = ({ - isOrigin, - tokens = [], - chainId, - selectedToken, - setDisplayType, - handleTokenChange, -}: { - isOrigin: boolean - tokens: any[] - chainId: number - selectedToken: Token - setDisplayType: (v: DisplayType) => void - handleTokenChange: (token: Token, type: 'from' | 'to') => void -}) => { - const [currentIdx, setCurrentIdx] = useState(-1) - const [searchStr, setSearchStr] = useState('') - let tokenList: any[] = [] - if (!isOrigin && tokens?.length > 0) { - tokens.map((token) => { - tokenList.push({ token, balance: Zero }) - }) - } else { - tokenList = tokens - } - tokenList = sortTokens(tokenList) - - const fuse = new Fuse(tokenList, { - includeScore: true, - threshold: 0.0, - keys: [ - { - name: 'token.symbol', - weight: 2, - }, - `token.addresses.${chainId}`, - 'token.name', - ], - }) - - if (searchStr?.length > 0) { - tokenList = fuse.search(searchStr).map((i) => i.item) - } - const escPressed = useKeyPress('Escape') - const arrowUp = useKeyPress('ArrowUp') - const arrowDown = useKeyPress('ArrowDown') - const enterPressed = useKeyPress('Enter') - - function onClose() { - setCurrentIdx(-1) - setDisplayType(DisplayType.DEFAULT) - } - - function onMenuItemClick(coin: any) { - handleTokenChange(coin, isOrigin ? 'from' : 'to') - onClose() - } - - function escFunc() { - if (escPressed) { - onClose() - } - } - - useEffect(escFunc, [escPressed]) - - function arrowDownFunc() { - const nextIdx = currentIdx + 1 - if (arrowDown && nextIdx < tokenList.length) { - setCurrentIdx(nextIdx) - } - } - - useEffect(arrowDownFunc, [arrowDown]) - - function arrowUpFunc() { - const nextIdx = currentIdx - 1 - if (arrowUp && -1 < nextIdx) { - setCurrentIdx(nextIdx) - } - } - - useEffect(arrowUpFunc, [arrowUp]) - - function enterPressedFunc() { - if (enterPressed && currentIdx > -1) { - onMenuItemClick(tokenList[currentIdx]) - } - } - - useEffect(enterPressedFunc, [enterPressed]) - - function onSearch(str: string) { - setSearchStr(str) - setCurrentIdx(-1) - } - - return ( -
-
-
- - -
-
-
- {tokenList.map((token, idx) => ( - { - onMenuItemClick(token.token) - }} - /> - ))} - {searchStr && ( -
- No other results found for{' '} - {searchStr}. -
- Want to see a token supported on Synapse? Submit a request{' '} - - here - -
-
- )} -
-
- ) -} diff --git a/packages/synapse-interface/constants/bridgeMap.ts b/packages/synapse-interface/constants/bridgeMap.ts index c40a689fd7..f229b4633a 100644 --- a/packages/synapse-interface/constants/bridgeMap.ts +++ b/packages/synapse-interface/constants/bridgeMap.ts @@ -1025,7 +1025,7 @@ export const BRIDGE_MAP = { symbol: 'nETH', origin: ['nETH'], destination: ['nETH'], - swappable: ['0x5FD55A1B9FC24967C4dB09C513C3BA0DFa7FF687'], + swappable: [], }, '0x4e71A2E537B7f9D9413D3991D37958c0b5e1e503': { decimals: 18, @@ -1045,13 +1045,6 @@ export const BRIDGE_MAP = { destination: ['SYN'], swappable: [], }, - '0x5FD55A1B9FC24967C4dB09C513C3BA0DFa7FF687': { - decimals: 18, - symbol: 'ETH', - origin: ['nETH'], - destination: ['nETH'], - swappable: ['0x09fEC30669d63A13c666d2129230dD5588E2e240'], - }, '0x80b5a32E4F032B2a058b4F29EC95EEfEEB87aDcd': { decimals: 6, symbol: 'USDC', diff --git a/packages/synapse-interface/constants/chains/master.tsx b/packages/synapse-interface/constants/chains/master.tsx index 34bb976247..0f362b646d 100644 --- a/packages/synapse-interface/constants/chains/master.tsx +++ b/packages/synapse-interface/constants/chains/master.tsx @@ -20,25 +20,11 @@ import optimismImg from '@assets/chains/optimism.svg' import polygonImg from '@assets/chains/polygon.svg' import ethExplorerImg from '@assets/explorer/etherscan.svg' -import arbitrumExplorerImg from '@assets/explorer/arbitrum.svg' -import blastExplorerImg from '@assets/explorer/blast.svg' +import arbitrumExplorerImg from '@assets/explorer/arbiscan.svg' import bnbExplorerImg from '@assets/explorer/bscscan.svg' -import avalancheExplorerImg from '@assets/explorer/avalanche.svg' -import cantoExplorerImg from '@assets/explorer/canto.svg' -import optimismExplorerImg from '@assets/explorer/optimism.svg' -import polygonExplorerImg from '@assets/explorer/polygon.svg' -import dfkExplorerImg from '@assets/explorer/dfk-chain.svg' -import klaytynExplorerImg from '@assets/explorer/klaytn.svg' -import fantomExplorerImg from '@assets/explorer/fantom.svg' -import cronosExplorerImg from '@assets/explorer/cronos.svg' -import bobaExplorerImg from '@assets/explorer/boba.svg' -import metisExplorerImg from '@assets/explorer/metis.svg' -import auroraExplorerImg from '@assets/explorer/aurora.svg' -import harmonyExplorerImg from '@assets/explorer/harmony.svg' -import moonbeamExplorerImg from '@assets/explorer/moonbeam.svg' -import moonriverExplorerImg from '@assets/explorer/moonriver.svg' -import dogeExplorerImg from '@assets/explorer/dogecoin.svg' import baseExplorerImg from '@assets/explorer/basescan.svg' +import avalancheExplorerImg from '@assets/explorer/snowscan.svg' +import fantomExplorerImg from '@assets/explorer/ftmscan.svg' import { Chain } from '@types' @@ -145,7 +131,7 @@ export const CANTO: Chain = { nativeCurrency: { name: 'Canto', symbol: 'CANTO', decimals: 18 }, explorerUrl: 'https://tuber.build/', explorerName: 'Canto Explorer', - explorerImg: cantoExplorerImg, + explorerImg: cantoImg, color: 'green', } @@ -166,7 +152,7 @@ export const OPTIMISM: Chain = { nativeCurrency: { name: 'Ethereum', symbol: 'ETH', decimals: 18 }, explorerUrl: 'https://optimistic.etherscan.io', explorerName: 'Optimism Explorer', - explorerImg: optimismExplorerImg, + explorerImg: optimismImg, color: 'red', } @@ -187,7 +173,7 @@ export const POLYGON: Chain = { nativeCurrency: { name: 'Matic', symbol: 'MATIC', decimals: 18 }, explorerUrl: 'https://polygonscan.com', explorerName: 'PolygonScan', - explorerImg: polygonExplorerImg, + explorerImg: polygonImg, color: 'purple', } @@ -207,7 +193,7 @@ export const DFK: Chain = { nativeCurrency: { name: 'Jewel', symbol: 'JEWEL', decimals: 18 }, explorerUrl: 'https://subnets.avax.network/defi-kingdoms', explorerName: 'DFK Subnet Explorer', - explorerImg: dfkExplorerImg, + explorerImg: dfkImg, color: 'lime', } @@ -227,7 +213,7 @@ export const KLAYTN: Chain = { nativeCurrency: { name: 'Klaytn', symbol: 'KLAY', decimals: 18 }, explorerUrl: 'https://scope.klaytn.com', explorerName: 'Klaytn Explorer', - explorerImg: klaytynExplorerImg, + explorerImg: klaytnImg, color: 'orange', } @@ -267,7 +253,7 @@ export const CRONOS: Chain = { nativeCurrency: { name: 'Cronos', symbol: 'CRO', decimals: 18 }, explorerUrl: 'https://cronoscan.com', explorerName: 'CronoScan', - explorerImg: cronosExplorerImg, + explorerImg: cronosImg, color: 'gray', } @@ -287,7 +273,7 @@ export const BOBA: Chain = { nativeCurrency: { name: 'Ethereum', symbol: 'ETH', decimals: 18 }, explorerUrl: 'https://bobascan.com', explorerName: 'Boba Explorer', - explorerImg: bobaExplorerImg, + explorerImg: bobaImg, color: 'lime', } @@ -307,7 +293,7 @@ export const METIS: Chain = { nativeCurrency: { name: 'Metis', symbol: 'METIS', decimals: 18 }, explorerUrl: 'https://andromeda-explorer.metis.io', explorerName: 'Metis Explorer', - explorerImg: metisExplorerImg, + explorerImg: metisImg, color: 'teal', } @@ -327,7 +313,7 @@ export const AURORA: Chain = { nativeCurrency: { name: 'Ethereum', symbol: 'ETH', decimals: 18 }, explorerUrl: 'https://explorer.mainnet.aurora.dev', explorerName: 'Aurora Explorer', - explorerImg: auroraExplorerImg, + explorerImg: auroraImg, color: 'lime', } @@ -347,7 +333,7 @@ export const HARMONY: Chain = { nativeCurrency: { name: 'Harmony One', symbol: 'ONE', decimals: 18 }, explorerUrl: 'https://explorer.harmony.one', explorerName: 'Harmony Explorer', - explorerImg: harmonyExplorerImg, + explorerImg: harmonyImg, color: 'cyan', } @@ -367,7 +353,7 @@ export const MOONBEAM: Chain = { nativeCurrency: { name: 'Glimmer', symbol: 'GLMR', decimals: 18 }, explorerUrl: 'https://moonbeam.moonscan.io', explorerName: 'Moonbeam Explorer', - explorerImg: moonbeamExplorerImg, + explorerImg: moonbeamImg, color: 'teal', } @@ -387,7 +373,7 @@ export const MOONRIVER: Chain = { nativeCurrency: { name: 'Moonriver', symbol: 'MOVR', decimals: 18 }, explorerUrl: 'https://moonriver.moonscan.io', explorerName: 'Moonriver Explorer', - explorerImg: moonriverExplorerImg, + explorerImg: moonriverImg, color: 'purple', } @@ -407,7 +393,7 @@ export const DOGE: Chain = { nativeCurrency: { name: 'DOGE', symbol: 'DOGE', decimals: 18 }, explorerUrl: 'https://explorer.dogechain.dog', explorerName: 'Dogechain Explorer', - explorerImg: dogeExplorerImg, + explorerImg: dogechainImg, color: 'purple', } @@ -436,7 +422,6 @@ export const BASE: Chain = { color: 'blue', } -// TODO: UPDATE ALL PARAMETERS FOR MAINNET export const BLAST: Chain = { priorityRank: 90, id: 81457, @@ -452,7 +437,7 @@ export const BLAST: Chain = { }, explorerUrl: 'https://blastscan.io', explorerName: 'Blastscan', - explorerImg: blastExplorerImg, + explorerImg: blastImg, blockTime: 3000, nativeCurrency: { name: 'Ether', diff --git a/packages/synapse-interface/craco.config.js b/packages/synapse-interface/craco.config.js deleted file mode 100644 index 435890e604..0000000000 --- a/packages/synapse-interface/craco.config.js +++ /dev/null @@ -1,9 +0,0 @@ -const CracoAlias = require('craco-alias') - -module.exports = { - plugins: [ - { - plugin: CracoAlias, - }, - ], -} diff --git a/packages/synapse-interface/package.json b/packages/synapse-interface/package.json index c9f0feae6c..2431c9177f 100644 --- a/packages/synapse-interface/package.json +++ b/packages/synapse-interface/package.json @@ -1,6 +1,6 @@ { "name": "@synapsecns/synapse-interface", - "version": "0.7.1", + "version": "0.9.8", "private": true, "engines": { "node": ">=16.0.0" @@ -25,17 +25,9 @@ }, "dependencies": { "@cloudflare/next-on-pages": "1", - "@depay/web3-mock": "^14.0.0", - "@ethersproject/abi": "5.7.0", - "@ethersproject/address": "5.7.0", "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", "@ethersproject/providers": "5.7.2", "@ethersproject/units": "5.7.0", - "@graphql-codegen/typescript-rtk-query": "^2.4.1", "@headlessui/react": "^1.7.15", "@heroicons/react": "1.0.6", "@rainbow-me/rainbowkit": "^1.0.4", @@ -46,30 +38,20 @@ "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/typography": "^0.5.9", - "@testing-library/cypress": "^9.0.0", "@types/node": "18.14.2", "@types/react": "18.0.28", "@types/react-dom": "18.0.11", "@types/web3": "^1.2.2", - "@vercel/analytics": "^1.0.2", "@visx/chord": "^3.0.0", "@visx/shape": "^3.0.0", "@wagmi/core": "^1.4.12", - "add": "^2.0.6", - "autoprefixer": "^10.4.13", "babel-plugin-transform-bigint": "^1.0.32", - "bignumber": "^1.1.0", - "cypress": "^13.0.0", - "dayjs": "^1.11.7", "eslint": "^8.37.0", "eslint-config-next": "^13.5.6", "ethers": "5.7.2", "fuse.js": "^6.6.2", "graphql": "^16.7.1", - "graphql-request": "^6.1.0", - "keccak": "^3.0.3", "lodash": "^4.17.21", - "lodash.debounce": "^4.0.8", "logrocket": "^7.0.0", "logrocket-react": "^6.0.3", "next": "^13.5.6", @@ -83,16 +65,13 @@ "react-redux": "^8.1.0", "react-spring": "^9.7.1", "redux-persist": "^6.0.0", - "start-server-and-test": "^2.0.0", "swr": "1.3.0", "tailwind-merge": "^1.10.0", "tailwind-scrollbar-hide": "^1.1.7", "tailwindcss": "^3.4.1", "tailwindcss-border-gradient-radius": "^3.0.1", - "tiny-warning": "^1.0.0", "typescript": "5.1.6", "use-persisted-state": "^0.3.3", - "use-window-focus": "^1.4.2", "viem": "^1.18.1", "wagmi": "^1.4.12", "yarn": "^1.22.19" @@ -117,13 +96,19 @@ "license": "ISC", "keywords": [], "devDependencies": { + "@depay/web3-mock": "^14.0.0", "@graphql-codegen/cli": "5.0.0", "@graphql-codegen/client-preset": "4.1.0", "@graphql-codegen/introspection": "4.0.0", + "@graphql-codegen/typescript-rtk-query": "^2.4.1", + "@testing-library/cypress": "^9.0.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^14.0.0", "@types/redux-persist": "^4.3.1", + "cypress": "^13.0.0", + "dayjs": "^1.11.7", "jest": "^29.6.1", - "jest-environment-jsdom": "^29.6.1" + "jest-environment-jsdom": "^29.6.1", + "start-server-and-test": "^2.0.0" } } diff --git a/packages/synapse-interface/pages/_app.tsx b/packages/synapse-interface/pages/_app.tsx index 32d8836c0e..6e544c16e2 100644 --- a/packages/synapse-interface/pages/_app.tsx +++ b/packages/synapse-interface/pages/_app.tsx @@ -3,7 +3,6 @@ import '@rainbow-me/rainbowkit/styles.css' import type { AppProps } from 'next/app' import Head from 'next/head' import '@/patch' -import { Analytics } from '@vercel/analytics/react' import { PersistGate } from 'redux-persist/integration/react' import LogRocket from 'logrocket' import setupLogRocketReact from 'logrocket-react' @@ -53,7 +52,6 @@ const App = ({ Component, pageProps }: AppProps) => { - diff --git a/packages/synapse-interface/pages/index.tsx b/packages/synapse-interface/pages/index.tsx index ae17084eea..79242cace6 100644 --- a/packages/synapse-interface/pages/index.tsx +++ b/packages/synapse-interface/pages/index.tsx @@ -3,7 +3,8 @@ import { Portfolio } from '@/components/Portfolio/Portfolio' import { LandingPageWrapper } from '@/components/layouts/LandingPageWrapper' import ReactGA from 'react-ga' import useSyncQueryParamsWithBridgeState from '@/utils/hooks/useSyncQueryParamsWithBridgeState' -import { EthDencunUpgradeBanner } from '@/components/Maintenance/EthDencunUpgrade' +import { EcotoneForkUpgradeBanner } from '@/components/Maintenance/Events/EcotoneForkUpgrade' +import { MetisDowntimeBanner } from '@/components/Maintenance/Events/MetisUpgrade' // TODO: someone should add this to the .env, disable if blank, etc. // this is being added as a hotfix to assess user load on the synapse explorer api @@ -20,7 +21,8 @@ const Home = () => { data-test-id="bridge-page" className="relative z-0 flex-1 h-full overflow-y-auto focus:outline-none" > - + +
diff --git a/packages/synapse-interface/pages/landing/sections/BridgeSection.tsx b/packages/synapse-interface/pages/landing/sections/BridgeSection.tsx index 949e96ce3f..2c3bcc7d5e 100644 --- a/packages/synapse-interface/pages/landing/sections/BridgeSection.tsx +++ b/packages/synapse-interface/pages/landing/sections/BridgeSection.tsx @@ -7,6 +7,7 @@ import { BridgeImage, BridgeImageSmall, } from '@/components/icons/LandingIcons/BridgeImage' +import FauxBridge from '@/components/icons/LandingIcons/FauxBridge' import { DeepLiquidityIcon } from '@/components/icons/LandingIcons/DeepLiquidityIcon' import { WideSupportIcon } from '@/components/icons/LandingIcons/WideSupportIcon' import { DeveloperIcon } from '@/components/icons/LandingIcons/DeveloperIcon' @@ -17,33 +18,25 @@ export default function BridgeSection() { styles="flex flex-wrap gap-8 justify-center max-w-4xl m-auto" dataTestId="landing-bridge-section" > -
+

Powering the most popular bridge

- Synapse Bridge is - built on top of the cross-chain infrastructure enabling users to - seamlessly transfer assets across all blockchains. The Bridge has - become the most widely-used method to move assets cross-chain, + Synapse Bridge{' '} + is built on top of the cross-chain infrastructure enabling users + to seamlessly transfer assets across all blockchains. The Bridge + has become the most widely-used method to move assets cross-chain, offering low cost, fast, and secure bridging.

-
- -
-
- -
+
- + }> Swap native assets using our cross-chain AMM liquidity pools diff --git a/packages/synapse-interface/pages/landing/sections/SecuritySection.tsx b/packages/synapse-interface/pages/landing/sections/SecuritySection.tsx index 8671a128e1..baa9500dc1 100644 --- a/packages/synapse-interface/pages/landing/sections/SecuritySection.tsx +++ b/packages/synapse-interface/pages/landing/sections/SecuritySection.tsx @@ -3,10 +3,7 @@ import { SectionContainer, SupportCard, } from '../../../components/landing/shared' -import { - SynapseCircuit, - SynapseCircuitSmall, -} from '@/components/icons/LandingIcons/SynapseCircuit' +import SynapseCircuit from '@/components/icons/LandingIcons/SynapseCircuit' import { SecureIcon } from '@/components/icons/LandingIcons/SecureIcon' import { ExtensibleIcon } from '@/components/icons/LandingIcons/ExtensibleIcon' import { GeneralizedIcon } from '@/components/icons/LandingIcons/GeneralizedIcon' @@ -17,7 +14,7 @@ export default function SecuritySection() { styles="flex flex-wrap gap-8 justify-center max-w-4xl m-auto" dataTestId="landing-security-section" > -
+

@@ -38,11 +35,7 @@ export default function SecuritySection() {

- + }> Synapse’s cross-chain messaging contracts can be deployed across any blockchain diff --git a/packages/synapse-interface/pages/pool/poolManagement/Deposit.tsx b/packages/synapse-interface/pages/pool/poolManagement/Deposit.tsx index c932b46a85..49e8a5f414 100644 --- a/packages/synapse-interface/pages/pool/poolManagement/Deposit.tsx +++ b/packages/synapse-interface/pages/pool/poolManagement/Deposit.tsx @@ -8,7 +8,6 @@ import { deposit, emptyPoolDeposit, } from '@/utils/actions/approveAndDeposit' -import { getAddress } from '@ethersproject/address' import { fetchBalance, waitForTransaction } from '@wagmi/core' import { getSwapDepositContractFields } from '@/utils/getSwapDepositContractFields' import { calculatePriceImpact } from '@/utils/priceImpact' @@ -20,7 +19,7 @@ import { useDispatch } from 'react-redux' import { DepositTokenInput } from '@components/TokenInput' import { Token } from '@types' import { Address } from '@wagmi/core' -import { zeroAddress } from 'viem' + import { resetPoolDeposit, setDepositQuote, @@ -41,6 +40,7 @@ import { txErrorHandler } from '@/utils/txErrorHandler' import LoadingTokenInput from '@components/loading/LoadingTokenInput' import PriceImpactDisplay from '../components/PriceImpactDisplay' import DepositButton from './DepositButton' +import { getAddress, zeroAddress } from 'viem' export const DEFAULT_DEPOSIT_QUOTE = { priceImpact: 0n, diff --git a/packages/synapse-interface/pages/state-managed-bridge/index.tsx b/packages/synapse-interface/pages/state-managed-bridge/index.tsx index f23db2701e..9c298791f6 100644 --- a/packages/synapse-interface/pages/state-managed-bridge/index.tsx +++ b/packages/synapse-interface/pages/state-managed-bridge/index.tsx @@ -58,11 +58,10 @@ import SettingsSlideOver from '@/components/StateManagedBridge/SettingsSlideOver import Button from '@/components/ui/tailwind/Button' import { SettingsIcon } from '@/components/icons/SettingsIcon' import { DestinationAddressInput } from '@/components/StateManagedBridge/DestinationAddressInput' -import { isAddress } from '@ethersproject/address' import { BridgeTransactionButton } from '@/components/StateManagedBridge/BridgeTransactionButton' import ExplorerToastLink from '@/components/ExplorerToastLink' -import { Address, zeroAddress, createPublicClient, http } from 'viem' import { polygon } from 'viem/chains' +import { Address, zeroAddress, isAddress } from 'viem' import { stringToBigInt } from '@/utils/bigint/format' import { Warning } from '@/components/Warning' import { useAppDispatch } from '@/store/hooks' @@ -87,10 +86,21 @@ import { import { isTransactionReceiptError } from '@/utils/isTransactionReceiptError' import { SwitchButton } from '@/components/buttons/SwitchButton' import { useEventCountdownProgressBar } from '@/components/Maintenance/EventCountdownProgressBar' + +import { + METIS_DOWNTIME_START_DATE, + METIS_DOWNTIME_END_DATE, + MetisDowntimeWarningMessage, + useMetisDowntimeCountdownProgress, +} from '@/components/Maintenance/Events/MetisUpgrade' import { - ETH_DENCUN_START_DATE, - ETH_DENCUN_END_DATE, -} from '@/components/Maintenance/EthDencunUpgrade' + ECOTONE_FORK_START_DATE, + ECOTONE_FORK_END_DATE, + EcotoneForkWarningMessage, + useEcotoneForkCountdownProgress, +} from '@/components/Maintenance/Events/EcotoneForkUpgrade' + +import { OPTIMISM, BASE, METIS } from '@/constants/chains/master' const StateManagedBridge = () => { const { address } = useAccount() @@ -523,14 +533,19 @@ const StateManagedBridge = () => { const springClass = '-mt-4 fixed z-50 w-full h-full bg-opacity-50 bg-[#343036]' + /* Remove after upgrades */ const { - isPending: isUpgradePending, - EventCountdownProgressBar: EthDencunEventCountdownProgressBar, - } = useEventCountdownProgressBar( - 'Dencun upgrade in progress', - ETH_DENCUN_START_DATE, - ETH_DENCUN_END_DATE - ) + isEcotoneForkUpgradePending, + isCurrentChainDisabled: isEcotoneUpgradeChainsDisabled, + EcotoneForkCountdownProgressBar, + } = useEcotoneForkCountdownProgress() + + const { + isMetisUpgradePending, + isCurrentChainDisabled: isMetisUpgradeChainDisabled, + MetisUpgradeCountdownProgressBar, + } = useMetisDowntimeCountdownProgress() + /* Remove after upgrades */ return (
@@ -569,73 +584,74 @@ const StateManagedBridge = () => { transition-all duration-100 transform rounded-md `} > - {EthDencunEventCountdownProgressBar} -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - { - dispatch(setFromChainId(toChainId)) - dispatch(setFromToken(toToken)) - dispatch(setToChainId(fromChainId)) - dispatch(setToToken(fromToken)) - }} + {EcotoneForkCountdownProgressBar} + {MetisUpgradeCountdownProgressBar} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + { + dispatch(setFromChainId(toChainId)) + dispatch(setFromToken(toToken)) + dispatch(setToChainId(fromChainId)) + dispatch(setToToken(fromToken)) + }} + /> + + + + {/* Remove after upgrades */} + {isEcotoneForkUpgradePending && } + {isMetisUpgradePending && } + {/* Remove after upgrades */} + + + + + {showDestinationAddress && ( + + )} +
+ - - - - - - {showDestinationAddress && ( - - )} -
- -
diff --git a/packages/synapse-interface/public/blacklist.json b/packages/synapse-interface/public/blacklist.json index 75ab13f5c3..40a945926d 100644 --- a/packages/synapse-interface/public/blacklist.json +++ b/packages/synapse-interface/public/blacklist.json @@ -424,5 +424,6 @@ "0xb59d04d9957c9e266dff5c4173d4d2324eb029ad", "0xecb11a8180544228bedf38c5eb6c27729571ea3e", "0x9961190B258897BCa7a12B8f37F415E689D281C4", - "0xe874Ae1a218C1A0d9983c908B587f029278B1C69" + "0xe874Ae1a218C1A0d9983c908B587f029278B1C69", + "0xc12f2430ddfd54797533f827f78e49fe004d51a0" ] diff --git a/packages/synapse-interface/public/landingBg.svg b/packages/synapse-interface/public/landingBg.svg index 3012143b16..36bd972ac1 100644 --- a/packages/synapse-interface/public/landingBg.svg +++ b/packages/synapse-interface/public/landingBg.svg @@ -1,10246 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/packages/synapse-interface/utils/checkCleanedValue.ts b/packages/synapse-interface/utils/checkCleanedValue.ts deleted file mode 100644 index 1ff094bb81..0000000000 --- a/packages/synapse-interface/utils/checkCleanedValue.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const checkCleanedValue = (cleanedValue) => { - return cleanedValue === 0 || cleanedValue === '' || isNaN(+cleanedValue) -} diff --git a/packages/synapse-interface/utils/displaySymbol.ts b/packages/synapse-interface/utils/displaySymbol.ts deleted file mode 100644 index e7ee671073..0000000000 --- a/packages/synapse-interface/utils/displaySymbol.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { SYNJEWEL } from '@constants/tokens/bridgeable' -import * as CHAINS from '@constants/chains/master' - -import { Token } from '@/utils/types' -/** - * In our `constants/tokens/master.tsx` file, we combine multiple stablecoin - * contracts like USDC/USDT into multiple networks. - * However, on chains like Avalanche, their contract addresses correspond to - * other symbols (USDC.e/USDT.e). This helper function decorates a symbol - * according to what it should reflect. We do this so we don't break any - * downstream logic from tokens. - * - * - * CHECK IF CAN DELETE ONCE SWAP IMPLEMENTED - */ - -export const displaySymbol = (chainId: number, token: Token) => { - if (!token?.symbol) { - return '' - } - if (token.symbol === SYNJEWEL.symbol) { - return 'synJEWEL' - } else if (chainId === CHAINS.AVALANCHE.id) { - switch (token.symbol) { - // case 'USDC': - // return 'USDC.e' - // case 'USDT': - // return 'USDT.e' - case 'DAI': - return 'DAI.e' - default: - return token.symbol - } - } else { - return token.symbol - } -} diff --git a/packages/synapse-interface/utils/getOrderedChains.ts b/packages/synapse-interface/utils/getOrderedChains.ts deleted file mode 100644 index bbdd7f5b6d..0000000000 --- a/packages/synapse-interface/utils/getOrderedChains.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ORDERED_CHAINS_BY_ID } from '@constants/chains' - -export const getOrderedChains = ( - connectedChainId: number, - chainId: number, - possibleChains: string[] | undefined -) => { - const filteredChains = ORDERED_CHAINS_BY_ID.filter( - (id) => Number(id) !== connectedChainId && possibleChains?.includes(id) - ) - - let index = filteredChains.findIndex((e) => Number(e) === chainId) - index = index === -1 ? 0 : index - const numberOfChains = filteredChains.length - let newList: number[] = [] - - if (index >= 0 && index < 4) { - newList = filteredChains.slice(0, 6).map((e) => Number(e)) - } else if (numberOfChains - (index + 1) > 1) { - newList = filteredChains.slice(index - 3, index + 3).map((e) => Number(e)) - } else if (numberOfChains - (index + 1) === 1) { - newList = filteredChains.slice(index - 4, index + 2).map((e) => Number(e)) - } else if (numberOfChains - (index + 1) < 1) { - newList = filteredChains.slice(index - 5, index + 1).map((e) => Number(e)) - } - - return newList -} diff --git a/packages/synapse-interface/utils/hooks/useDebounce.ts b/packages/synapse-interface/utils/hooks/useDebounce.ts deleted file mode 100644 index 54c28f1b6d..0000000000 --- a/packages/synapse-interface/utils/hooks/useDebounce.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { useEffect, useState } from 'react' - -// hack fix on https://usehooks.com/useDebounce/ -/** - * @param value - * @param {number} delay in ms - */ -export const useDebounce = (value, delay) => { - const [debouncedValue, setDebouncedValue] = useState(value) - - useEffect(() => { - // Update debounced value after delay - const handler = setTimeout(() => { - setDebouncedValue(value) - }, delay) - - // Cancel the timeout if value changes (also on delay change or unmount) - // This is how we prevent debounced value from updating if value is changed ... - // .. within the delay period. Timeout gets cleared and restarted. - return () => { - clearTimeout(handler) - } - }, [value, delay]) - - return debouncedValue -} diff --git a/packages/synapse-interface/utils/hooks/useDebounce.tsx b/packages/synapse-interface/utils/hooks/useDebounce.tsx deleted file mode 100644 index 864c7c305f..0000000000 --- a/packages/synapse-interface/utils/hooks/useDebounce.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { useEffect, useState } from 'react' - -// hack fix on https://usehooks.com/useDebounce/ -/** - * @param value - * @param {number} delay in ms - */ -export function useDebounce(value, delay) { - const [debouncedValue, setDebouncedValue] = useState(value) - - useEffect(() => { - // Update debounced value after delay - const handler = setTimeout(() => { - setDebouncedValue(value) - }, delay) - - // Cancel the timeout if value changes (also on delay change or unmount) - // This is how we prevent debounced value from updating if value is changed ... - // .. within the delay period. Timeout gets cleared and restarted. - return () => { - clearTimeout(handler) - } - }, [value, delay]) - - return debouncedValue -} diff --git a/packages/synapse-interface/utils/hooks/useIntervalTimer.ts b/packages/synapse-interface/utils/hooks/useIntervalTimer.ts index c394bff315..c84a5d07e9 100644 --- a/packages/synapse-interface/utils/hooks/useIntervalTimer.ts +++ b/packages/synapse-interface/utils/hooks/useIntervalTimer.ts @@ -6,24 +6,30 @@ import { getTimeMinutesFromNow } from '@/utils/time' * Hook for setting an interval based timer * * @param intervalInMs number, in ms (1000ms = 1s) + * @param isDisabled boolean, determines if we update at intervals * returns current time in minutes, unix */ -export const useIntervalTimer = (intervalInMs: number) => { +export const useIntervalTimer = ( + intervalInMs: number, + isDisabled?: boolean +) => { const [currentTime, setCurrentTime] = useState( getTimeMinutesFromNow(0) ) - /** Update time at set intervals */ + /** Update time at set intervals if not disabled */ useEffect(() => { - const interval = setInterval(() => { - const newCurrentTime = getTimeMinutesFromNow(0) - setCurrentTime(newCurrentTime) - }, intervalInMs) + if (!isDisabled) { + const interval = setInterval(() => { + const newCurrentTime = getTimeMinutesFromNow(0) + setCurrentTime(newCurrentTime) + }, intervalInMs) - return () => { - clearInterval(interval) // Clear the interval when the component unmounts + return () => { + clearInterval(interval) // Clear the interval when the component unmounts + } } - }, []) + }, [isDisabled]) return currentTime } diff --git a/packages/synapse-interface/utils/hooks/useSettings.tsx b/packages/synapse-interface/utils/hooks/useSettings.tsx deleted file mode 100644 index f38490d169..0000000000 --- a/packages/synapse-interface/utils/hooks/useSettings.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import createPersistedState from 'use-persisted-state' - -const usePassthroughSettings = createPersistedState('settingsObjStuff') - -export const useSettings = () => { - return usePassthroughSettings({ - expertMode: false, - }) -} diff --git a/packages/synapse-interface/utils/hooks/useTxHistory.ts b/packages/synapse-interface/utils/hooks/useTxHistory.ts deleted file mode 100644 index daf31856a5..0000000000 --- a/packages/synapse-interface/utils/hooks/useTxHistory.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { useState } from 'react' -import _ from 'lodash' - -export const useTxHistory = () => { - // const { account } = useActiveWeb3React() - // const [transactionsByAccount, setTransactionsByAccount] = usePersistedTransactionHistory({}) - - // const transactions = transactionsByAccount[account] ?? [] - - // function setTransactions(txns) { - // setTransactionsByAccount({ - // ...transactionsByAccount, - // [account]: txns - // }) - // } - const [transactions, setTransactions] = useState([]) - - const addTransaction = ({ - transactionHash, - hash, - chainId, - ...transaction - }) => { - const formattedTx = { - transactionHash: transactionHash ?? hash, - chainId, - ...transaction, - } - - const filteredTransactions = transactions.filter( - (tx) => tx.transactionHash !== formattedTx.transactionHash - ) - const arr = [...filteredTransactions, formattedTx] - - setTransactions(arr) - } - - const updateTransactions = (txns) => { - setTransactions((oldTransactions) => { - const newTxnHashes = txns.map((tx) => tx.transactionHash ?? tx.hash) - - const filteredPrevTxns = oldTransactions.filter((tx) => { - const txOverlap = newTxnHashes.includes(tx.transactionHash ?? tx.hash) - return !txOverlap - }) - - const txnsToAdd = _.sortBy( - [ - ...filteredPrevTxns, - ...txns.map((tx) => { - return { ...tx, transactionHash: tx.transactionHash ?? tx.hash } - }), - ], - (tx) => -tx.timestamp - ) - return txnsToAdd - }) - } - - const clear = () => { - setTransactions([]) - } - - return { - transactions, - setTransactions, - addTransaction, - updateTransactions, - clear, - } -} diff --git a/packages/synapse-interface/utils/matchSymbolWithinPool.ts b/packages/synapse-interface/utils/matchSymbolWithinPool.ts deleted file mode 100644 index 974653ab9d..0000000000 --- a/packages/synapse-interface/utils/matchSymbolWithinPool.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AVWETH } from '@constants/tokens/auxilliary' -import { WETHE, ETH, WETH } from '@constants/tokens/bridgeable' - -/** - * @param {Token} matchCoin the coin in the pool/ token of poolTokens - * @param {Token} compareCoin the coin to compare (fromCoin/toCoin) - */ -export const matchSymbolWithinPool = (matchCoin, compareCoin) => { - let compareSymbol = compareCoin.symbol - if (compareSymbol === WETHE.symbol) { - compareSymbol = AVWETH.symbol - } else if (compareSymbol === ETH.symbol) { - compareSymbol = WETH.symbol - } - return matchCoin.symbol === compareSymbol -} diff --git a/packages/synapse-interface/utils/remove0xPrefix.ts b/packages/synapse-interface/utils/remove0xPrefix.ts deleted file mode 100644 index b5536f0c79..0000000000 --- a/packages/synapse-interface/utils/remove0xPrefix.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const remove0xPrefix = (str?: string): string => { - if (!str) { - return str - } - if (str.startsWith('0x')) { - return str.slice(2) - } - return str -} diff --git a/packages/synapse-interface/utils/toHexStr.ts b/packages/synapse-interface/utils/toHexStr.ts deleted file mode 100644 index 173f6fdebc..0000000000 --- a/packages/synapse-interface/utils/toHexStr.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const toHexStr = (num: number) => { - return `0x${num.toString(16)}` -} diff --git a/packages/synapse-interface/utils/types/index.tsx b/packages/synapse-interface/utils/types/index.tsx index 0e95aa25d5..2ceff00ea1 100644 --- a/packages/synapse-interface/utils/types/index.tsx +++ b/packages/synapse-interface/utils/types/index.tsx @@ -1,6 +1,6 @@ import { BigNumber } from '@ethersproject/bignumber' import * as CHAINS from '@constants/chains/master' -import { getAddress } from '@ethersproject/address' +import { getAddress } from 'viem' export type Chain = { id: number diff --git a/packages/synapse-interface/utils/validateAndParseAddress.ts b/packages/synapse-interface/utils/validateAndParseAddress.ts deleted file mode 100644 index 642b5294ec..0000000000 --- a/packages/synapse-interface/utils/validateAndParseAddress.ts +++ /dev/null @@ -1,13 +0,0 @@ -import warning from 'tiny-warning' -import { getAddress } from '@ethersproject/address' - -export const validateAndParseAddress = (address: string) => { - try { - const checksummedAddress = getAddress(address) - warning(address === checksummedAddress, `${address} is not checksummed.`) - return checksummedAddress - } catch (error) { - console.error(error) - console.error(`${address} is not a valid address.`) - } -} diff --git a/packages/widget/CHANGELOG.md b/packages/widget/CHANGELOG.md index 3c031f81a7..0289845f85 100644 --- a/packages/widget/CHANGELOG.md +++ b/packages/widget/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.1.5](https://github.com/synapsecns/sanguine/compare/@synapsecns/widget@0.1.4...@synapsecns/widget@0.1.5) (2024-03-14) + +**Note:** Version bump only for package @synapsecns/widget + + + + + +## [0.1.4](https://github.com/synapsecns/sanguine/compare/@synapsecns/widget@0.1.3...@synapsecns/widget@0.1.4) (2024-03-14) + +**Note:** Version bump only for package @synapsecns/widget + + + + + ## [0.1.3](https://github.com/synapsecns/sanguine/compare/@synapsecns/widget@0.1.2...@synapsecns/widget@0.1.3) (2024-03-13) **Note:** Version bump only for package @synapsecns/widget diff --git a/packages/widget/package.json b/packages/widget/package.json index 7a2ff9f859..f7b7b5cc4a 100644 --- a/packages/widget/package.json +++ b/packages/widget/package.json @@ -1,7 +1,7 @@ { "name": "@synapsecns/widget", "description": "Widget library for interacting with the Synapse Protocol", - "version": "0.1.3", + "version": "0.1.5", "license": "MIT", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", diff --git a/packages/widget/src/components/TransactionSupport.tsx b/packages/widget/src/components/TransactionSupport.tsx index a5c5d9a45a..b542a4a6b3 100644 --- a/packages/widget/src/components/TransactionSupport.tsx +++ b/packages/widget/src/components/TransactionSupport.tsx @@ -1,4 +1,5 @@ -// TODO: Add FAQ link +import { TRANSACTION_SUPPORT_URL } from '@/constants/index' + export const TransactionSupport = () => { return (
{ >
What's taking so long?
- {/* { > F.A.Q -
/
*/} +
/