Skip to content

Commit

Permalink
Merge branch 'main' into limit_bridge_call_selector
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Feb 22, 2024
2 parents 884b4b0 + 74df106 commit 6a31ac6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 24 deletions.
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 @@ -174,10 +174,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
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 @@ -107,6 +107,7 @@ contract ERC721Vault is BaseNFTVault, IERC721ReceiverUpgradeable {
});
}

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

0 comments on commit 6a31ac6

Please sign in to comment.