Skip to content

Commit

Permalink
Merge branch 'main' into add-UpdateTierProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored Feb 23, 2024
2 parents 54c8c8a + 0496ff4 commit 794b3f2
Show file tree
Hide file tree
Showing 15 changed files with 322 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages/branding": "0.3.0",
"packages/bridge-ui": "2.9.0",
"packages/bridge-ui": "2.9.1",
"packages/eventindexer": "0.13.0",
"packages/fork-diff": "0.4.0",
"packages/guardian-prover-health-check": "0.1.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/bridge-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [2.9.1](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v2.9.0...bridge-ui-v2.9.1) (2024-02-22)


### Bug Fixes

* **bridge-ui:** add dependency ([#15999](https://github.com/taikoxyz/taiko-mono/issues/15999)) ([14484a0](https://github.com/taikoxyz/taiko-mono/commit/14484a00c1d59332361fba32b74d39db2ae4b864))
* **bridge-ui:** fix wrong balance updates on network switch ([#15980](https://github.com/taikoxyz/taiko-mono/issues/15980)) ([b556e00](https://github.com/taikoxyz/taiko-mono/commit/b556e000b25fc8d5405cba77f3eebb4152dc1497))
* **bridge-ui:** incorrectly detecting bridged tokens ([#16007](https://github.com/taikoxyz/taiko-mono/issues/16007)) ([b151bcb](https://github.com/taikoxyz/taiko-mono/commit/b151bcb2e159ece03da3c2014e35dbbbed7d8410))
* **bridge-ui:** transactions view styling ([#15997](https://github.com/taikoxyz/taiko-mono/issues/15997)) ([620a22d](https://github.com/taikoxyz/taiko-mono/commit/620a22dcb1ce77a9335dff8bbe0546c4c5065b23))
* fix typos in tests and comments ([#15028](https://github.com/taikoxyz/taiko-mono/issues/15028)) ([54bf597](https://github.com/taikoxyz/taiko-mono/commit/54bf597c89a7f22161eeeffd13c20fe0acb4e2d7))

## [2.9.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v2-v2.8.0...bridge-ui-v2-v2.9.0) (2023-10-18)


Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/config/sample/configuredBridges.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"signalServiceAddress": "",
"hops": [
{
"chaind: ,
"chaind": ,
"crossChainSyncAddress": "",
"signalServiceAddress": "",
}
Expand All @@ -55,7 +55,7 @@
"signalServiceAddress": "",
"hops": [
{
"chaind: ,
"chaind": ,
"crossChainSyncAddress": "",
"signalServiceAddress": "",
}
Expand Down
7 changes: 4 additions & 3 deletions packages/bridge-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridge-ui",
"version": "2.9.0",
"version": "2.9.1",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down Expand Up @@ -61,8 +61,9 @@
"dependencies": {
"@wagmi/connectors": "^4.1.14",
"@wagmi/core": "^2.6.5",
"@walletconnect/ethereum-provider": "^2.11.1",
"@web3modal/wagmi": "^4.0.5",
"@walletconnect/ethereum-provider": "^2.11.2",
"@walletconnect/modal": "^2.6.2",
"@web3modal/wagmi": "^4.0.9",
"@zerodevx/svelte-toast": "^0.9.5",
"axios": "^1.6.7",
"buffer": "^6.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{:else}
<ActionButton
priority="primary"
class="!max-w-[215px] !min-h-[32px] !f-items-center !py-0"
class="!max-w-[215px] !min-h-[32px] !max-h-[48px] !f-items-center !py-0"
loading={web3modalOpen}
on:click={connectWallet}>
<div class="flex items-center body-regular space-x-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { getTokenAddresses } from '$libs/token/getTokenAddresses';
import { getLogger } from '$libs/util/logger';
import { uid } from '$libs/util/uid';
import { account } from '$stores/account';
import { type Account, account } from '$stores/account';
import { connectedSourceChain } from '$stores/network';
import DialogView from './DialogView.svelte';
Expand Down Expand Up @@ -98,7 +98,10 @@
}
if (tokenInfo.canonical && tokenInfo.bridged) {
// double check we have the correct address for the destination chain and it is not 0x0
if (value?.addresses[destChain.id] !== tokenInfo.canonical?.address) {
if (
value?.addresses[destChain.id] !== tokenInfo.canonical?.address &&
value?.addresses[destChain.id] !== zeroAddress
) {
log('selected token is bridged', value?.addresses[destChain.id]);
$selectedTokenIsBridged = true;
} else {
Expand Down Expand Up @@ -174,10 +177,11 @@
if (srcChain && destChain) updateBalance($account?.address, srcChain.id, destChain.id);
};
const onAccountChange = () => {
const onAccountChange = (newAccount: Account, prevAccount?: Account) => {
const srcChain = $connectedSourceChain;
const destChain = $destNetwork;
if (srcChain && destChain) updateBalance($account?.address, srcChain.id, destChain.id);
if (destChain && srcChain && (newAccount?.chainId === prevAccount?.chainId || !newAccount || !prevAccount))
updateBalance($account?.address, srcChain.id, destChain.id);
};
$: textClass = disabled ? 'text-secondary-content' : 'font-bold ';
Expand Down
41 changes: 21 additions & 20 deletions packages/bridge-ui/src/components/Transactions/Transaction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,29 @@
<!-- We disable these warnings as we dynamically add the role -->
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="flex text-primary-content md:h-[80px] h-[45px] w-full my-[10px] md:my-[0px]">
<div class="flex items-center text-primary-content md:h-[80px] h-[45px] w-full my-[10px] md:my-[0px]">
{#if isDesktopOrLarger}
{#if loading}
<div class="rounded-[10px] w-[50px] h-[50px] bg-neutral flex items-center justify-center">
<Spinner />
</div>
<div class="f-col text-left space-y-1">
<LoadingText mask="&nbsp;" class="min-w-[50px] max-w-[50px] h-4" />
<LoadingText mask="&nbsp;" class="min-w-[90px] max-w-[90px] h-4" />
<LoadingText mask="&nbsp;" class="min-w-[20px] max-w-[20px] h-4" />
</div>
{:else}
<img alt="nft" src={imgUrl} class="rounded-[10px] min-w-[50px] max-w-[50px] bg-neutral self-center" />
<div class="f-col text-left">
<div class="text-sm">{token?.name ? truncateString(token?.name, 15) : ''}</div>
<div class="text-sm text-secondary-content">
{token?.metadata?.name ? truncateString(token?.metadata?.name, 15) : ''}
<div class="flex md:w-3/12 gap-[8px]">
{#if loading}
<div class="rounded-[10px] w-[50px] h-[50px] bg-neutral flex items-center justify-center">
<Spinner />
</div>
<div class="text-sm text-secondary-content">{token?.tokenId}</div>
</div>
{/if}

<div class="f-col text-left space-y-1">
<LoadingText mask="&nbsp;" class="min-w-[50px] max-w-[50px] h-4" />
<LoadingText mask="&nbsp;" class="min-w-[90px] max-w-[90px] h-4" />
<LoadingText mask="&nbsp;" class="min-w-[20px] max-w-[20px] h-4" />
</div>
{:else}
<img alt="nft" src={imgUrl} class="rounded-[10px] min-w-[50px] max-w-[50px] bg-neutral self-center" />
<div class="f-col text-left">
<div class="text-sm">{token?.name ? truncateString(token?.name, 15) : 'No Token Name'}</div>
<div class="text-sm text-secondary-content">
{token?.metadata?.name ? truncateString(token?.metadata?.name, 15) : ''}
</div>
<div class="text-sm text-secondary-content">{token?.tokenId}</div>
</div>
{/if}
</div>
<div class="w-2/12 py-2 flex flex-row">
<ChainSymbolName chainId={item.srcChainId} />
</div>
Expand Down
2 changes: 2 additions & 0 deletions packages/bridge-ui/src/libs/connect/web3modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const chainImages = getChainImages();
export const web3modal = createWeb3Modal({
wagmiConfig: config,
projectId,
featuredWalletIds: [],
excludeWalletIds: ['c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96'],
// chains,
chainImages,
themeVariables: {
Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/src/libs/wagmi/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { walletConnect } from '@wagmi/connectors';
import { injected, walletConnect } from '@wagmi/connectors';
import { createConfig, getPublicClient, http, reconnect } from '@wagmi/core';

import { PUBLIC_WALLETCONNECT_PROJECT_ID } from '$env/static/public';
Expand All @@ -15,7 +15,7 @@ const transports = chains.reduce((acc, { id }) => ({ ...acc, [id]: http() }), {}
export const config = createConfig({
//@ts-ignore
chains: [...chains],
connectors: [walletConnect({ projectId })],
connectors: [walletConnect({ projectId, showQrModal: false }), injected()],
transports,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
</svelte:head>

<Overview />
<p>hiya! this is just a fun test, you can ignore it</p>
1 change: 0 additions & 1 deletion packages/protocol/contracts/common/EssentialContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ abstract contract EssentialContract is OwnerUUPSUpgradable, AddressResolver {
}

/// @notice Initializes the contract without an address manager.
// solhint-disable-next-line func-name-mixedcase
function __Essential_init() internal virtual {
__Essential_init(address(0));
}
Expand Down
1 change: 1 addition & 0 deletions packages/protocol/contracts/tokenvault/ERC721Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ contract ERC721Vault is BaseNFTVault, IERC721ReceiverUpgradeable {
});
}

/// @inheritdoc IRecallableSender
function onMessageRecalled(
IBridge.Message calldata message,
bytes32 msgHash
Expand Down
Loading

0 comments on commit 794b3f2

Please sign in to comment.