Skip to content

Commit

Permalink
Merge branch 'main' into remove_tx_origin
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Apr 4, 2024
2 parents 456579f + 2fe4695 commit 396f042
Show file tree
Hide file tree
Showing 26 changed files with 435 additions and 384 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"packages/blobstorage": "0.1.0",
"packages/branding": "0.3.0",
"packages/bridge-ui": "3.0.0",
"packages/bridge-ui": "4.0.0",
"packages/eventindexer": "0.13.0",
"packages/fork-diff": "0.4.0",
"packages/guardian-prover-health-check": "0.1.0",
Expand Down
27 changes: 27 additions & 0 deletions packages/bridge-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## [4.0.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v3.0.0...bridge-ui-v4.0.0) (2024-04-04)


### ⚠ BREAKING CHANGES

* **bridge-ui:** update to protocol 1.0, two step bridging ([#16230](https://github.com/taikoxyz/taiko-mono/issues/16230))

### Features

* **bridge-ui:** add testnet name to header ([#16619](https://github.com/taikoxyz/taiko-mono/issues/16619)) ([294bb01](https://github.com/taikoxyz/taiko-mono/commit/294bb017d90e4b8c2e1338a09f1cef90cdb54831))
* **bridge-ui:** base64 NFT data ([#16645](https://github.com/taikoxyz/taiko-mono/issues/16645)) ([4516d0a](https://github.com/taikoxyz/taiko-mono/commit/4516d0aaa3c9ff0c50f16d1abc82999a8ac3d02f))
* **bridge-ui:** prepare for hekla ([#16618](https://github.com/taikoxyz/taiko-mono/issues/16618)) ([6953b3c](https://github.com/taikoxyz/taiko-mono/commit/6953b3c141a1dec744a0e0bfa8c9aa0a1f405407))
* **bridge-ui:** retry dialog ([#16536](https://github.com/taikoxyz/taiko-mono/issues/16536)) ([3beba21](https://github.com/taikoxyz/taiko-mono/commit/3beba214e62ad196bafd716cadaa3f133ecdb021))
* **bridge-ui:** update to protocol 1.0, two step bridging ([#16230](https://github.com/taikoxyz/taiko-mono/issues/16230)) ([71babae](https://github.com/taikoxyz/taiko-mono/commit/71babae14645ff267c7baa101706860aa6f556f0))
* **protocol:** risc0 verifier contract ([#16331](https://github.com/taikoxyz/taiko-mono/issues/16331)) ([17abc18](https://github.com/taikoxyz/taiko-mono/commit/17abc189ca3d2752beb5400c036a650fd5b9c895))


### Bug Fixes

* **bridge-ui:** add missing labels to i18n ([#16633](https://github.com/taikoxyz/taiko-mono/issues/16633)) ([3854467](https://github.com/taikoxyz/taiko-mono/commit/38544675bf6578bc1016ecfd60cb3a1f93207516))
* **bridge-ui:** balance updating when connecting ([#16481](https://github.com/taikoxyz/taiko-mono/issues/16481)) ([2ec333f](https://github.com/taikoxyz/taiko-mono/commit/2ec333f5d3f3330c11dc0ab3afacc027c33cd5e0))
* **bridge-ui:** canonical check can use wrong chain, incorrect supported chain check ([#16526](https://github.com/taikoxyz/taiko-mono/issues/16526)) ([d826e88](https://github.com/taikoxyz/taiko-mono/commit/d826e886eba989c35b3f28145f815642684f84d7))
* **bridge-ui:** correct display of forward arrow and handling of invalid pagination input ([#16485](https://github.com/taikoxyz/taiko-mono/issues/16485)) ([d4d9ce9](https://github.com/taikoxyz/taiko-mono/commit/d4d9ce9bb7914b21f8ce6fc1ac5f986eb64d41f8))
* **bridge-ui:** fix issue where balance is shown for wrong token ([#16541](https://github.com/taikoxyz/taiko-mono/issues/16541)) ([1dd47cf](https://github.com/taikoxyz/taiko-mono/commit/1dd47cf5eca91d47375547b23203a9f942e22e80))
* **bridge-ui:** move label to i18n, fix some typos ([#16522](https://github.com/taikoxyz/taiko-mono/issues/16522)) ([c8c4773](https://github.com/taikoxyz/taiko-mono/commit/c8c4773dd3fe41decf13306eace73d65a9829529))
* **bridge-ui:** prevent reverse tabnabbing attacks ([#16583](https://github.com/taikoxyz/taiko-mono/issues/16583)) ([fc57d82](https://github.com/taikoxyz/taiko-mono/commit/fc57d82cb7c049a656c2f08d947f4a5a42ffacf3))

## [3.0.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v2.9.3...bridge-ui-v3.0.0) (2024-03-08)


Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridge-ui",
"version": "3.0.0",
"version": "4.0.0",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
{#if displayedRecipient}
{shortenAddress(displayedRecipient, 8, 10)}
{#if displayedRecipient !== $account?.address}
<span class="text-primary-link">| Customized</span>
<span class="text-primary-link">| {$t('common.customized')}</span>
{/if}
{:else}
{$t('recipient.placeholder')}
Expand Down
6 changes: 4 additions & 2 deletions packages/bridge-ui/src/components/Paginator/Paginator.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
import { t } from 'svelte-i18n';
import { Icon } from '$components/Icon';
Expand Down Expand Up @@ -41,7 +42,7 @@
<!-- Button to go to previous page -->
<button class={btnClass} on:click={() => goToPage(currentPage - 1)}> <Icon type="chevron-left" /></button>
{/if}
Page
{$t('paginator.page')}
<input
type="number"
class="form-control mx-1 text-center rounded-md py-1 px-8"
Expand All @@ -50,7 +51,8 @@
max={totalPages}
on:keydown={handleKeydown}
on:blur={() => goToPage(currentPage)} />
of {totalPages}
{$t('paginator.of')}
{totalPages}
<!-- Button to go to next page -->
{#if !isLastPage}
<button class={btnClass} on:click={() => goToPage(currentPage + 1)}><Icon type="chevron-right" /></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</div>
<div class="h-sep mt-[20px] mb-0" />
<div class="w-full px-[24px] my-[20px]">
<ActionButton priority="primary" on:click={closeMenu}>See results</ActionButton>
<ActionButton priority="primary" on:click={closeMenu}>{$t('common.see_results')}</ActionButton>
</div>
</div>
<button class="overlay-backdrop" on:click={closeMenu} />
Expand Down
7 changes: 6 additions & 1 deletion packages/bridge-ui/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@
"symbol": "Symbol",
"to": "To",
"token_id": "Token ID",
"token_standard": "Token standard"
"token_standard": "Token standard",
"see_results": "See results"
},
"custom_recipient": {
"placeholder": "Add custom recipient"
Expand Down Expand Up @@ -564,5 +565,9 @@
"connecting": "Connecting",
"disconnected": "Disconnected"
}
},
"paginator": {
"page": "Page",
"of": "of"
}
}
17 changes: 12 additions & 5 deletions packages/bridge-ui/src/libs/token/fetchNFTImageUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { get } from 'svelte/store';

import { destNetwork } from '$components/Bridge/state';
import { fetchNFTMetadata } from '$libs/token/fetchNFTMetadata';
import { decodeBase64ToJson } from '$libs/util/decodeBase64ToJson';
import { getLogger } from '$libs/util/logger';
import { resolveIPFSUri } from '$libs/util/resolveIPFSUri';
import { addMetadataToCache, isMetadataCached } from '$stores/metadata';
Expand Down Expand Up @@ -62,12 +63,18 @@ const fetchImageUrl = async (url: string): Promise<string> => {
return url;
} else {
log('fetchImageUrl failed to load image');
const newUrl = await resolveIPFSUri(url);
if (newUrl) {
const gatewayImageLoaded = await testImageLoad(newUrl);
if (gatewayImageLoaded) {
return newUrl;
if (url.startsWith('ipfs://')) {
const newUrl = await resolveIPFSUri(url);
if (newUrl) {
const gatewayImageLoaded = await testImageLoad(newUrl);
if (gatewayImageLoaded) {
return newUrl;
}
}
} else if (url.startsWith('data:image/svg+xml;base64,')) {
const base64 = url.replace('data:image/svg+xml;base64,', '');
const decodedImage = decodeBase64ToJson(base64);
return decodedImage;
}
}
throw new Error(`No image found for ${url}`);
Expand Down
Loading

0 comments on commit 396f042

Please sign in to comment.