From e48f17c1d3b1314846c4e05fcf5f1b215a12a9bb Mon Sep 17 00:00:00 2001 From: Francisco Ramos Date: Fri, 2 Jun 2023 20:22:52 +0200 Subject: [PATCH] chore(bridge-ui): improve type checking (#13856) Co-authored-by: dave | d1onys1us <13951458+d1onys1us@users.noreply.github.com> --- .../bridge-ui/src/bridge/ETHBridge.spec.ts | 2 + .../components/BridgeForm/BridgeForm.svelte | 4 +- packages/bridge-ui/src/constants/envVars.ts | 35 ++++---- packages/bridge-ui/src/domain/chain.ts | 3 +- packages/bridge-ui/src/domain/relayerApi.ts | 12 +-- packages/bridge-ui/src/domain/token.ts | 7 +- packages/bridge-ui/src/globals.d.ts | 1 + .../bridge-ui/src/proof/ProofService.spec.ts | 80 +++++++++---------- .../src/relayer-api/RelayerAPIService.spec.ts | 2 +- .../src/relayer-api/RelayerAPIService.ts | 8 +- .../bridge-ui/src/signer/subscriber.spec.ts | 2 +- packages/bridge-ui/src/signer/subscriber.ts | 9 ++- .../src/storage/StorageService.spec.ts | 2 +- .../bridge-ui/src/storage/StorageService.ts | 11 +-- .../bridge-ui/src/utils/addressAvatar.spec.ts | 2 - .../src/utils/addressSubsection.spec.ts | 2 - .../checkIfTokenIsDeployedCrossChain.spec.ts | 4 +- .../bridge-ui/src/utils/getAddressForToken.ts | 3 +- .../src/utils/isOnCorrectChain.spec.ts | 2 +- .../src/utils/recommendProcessingFee.spec.ts | 3 +- .../src/utils/truncateString.spec.ts | 2 - packages/bridge-ui/src/vault/tokenVaults.ts | 4 +- 22 files changed, 97 insertions(+), 103 deletions(-) diff --git a/packages/bridge-ui/src/bridge/ETHBridge.spec.ts b/packages/bridge-ui/src/bridge/ETHBridge.spec.ts index 466b0d58428..e99479e61aa 100644 --- a/packages/bridge-ui/src/bridge/ETHBridge.spec.ts +++ b/packages/bridge-ui/src/bridge/ETHBridge.spec.ts @@ -68,6 +68,8 @@ describe('bridge tests', () => { contractAddress: '0x1234', spenderAddress: '0x', }); + + expect(tx).toEqual({}); }); it('bridges with processing fee, owner !== to', async () => { diff --git a/packages/bridge-ui/src/components/BridgeForm/BridgeForm.svelte b/packages/bridge-ui/src/components/BridgeForm/BridgeForm.svelte index 59485954107..b43a49fe32c 100644 --- a/packages/bridge-ui/src/components/BridgeForm/BridgeForm.svelte +++ b/packages/bridge-ui/src/components/BridgeForm/BridgeForm.svelte @@ -1,5 +1,5 @@