diff --git a/assets/logos/web-kukai.png b/assets/logos/web-kukai.png index b55b70f98..6a39c2f48 100644 Binary files a/assets/logos/web-kukai.png and b/assets/logos/web-kukai.png differ diff --git a/package-lock.json b/package-lock.json index c3d65ceea..63f4c5321 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-sdk", - "version": "2.3.2", + "version": "2.3.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 4357dc1ed..9a0cb0604 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-sdk", - "version": "2.3.2", + "version": "2.3.3", "description": "The beacon-sdk allows you to easily connect DApps with Wallets through P2P communication or a chrome extension.", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", diff --git a/scripts/generate-wallet-list.ts b/scripts/generate-wallet-list.ts index db8d538df..e75447601 100644 --- a/scripts/generate-wallet-list.ts +++ b/scripts/generate-wallet-list.ts @@ -36,7 +36,8 @@ export const webList: WebApp[] = [ [NetworkType.DELPHINET]: 'https://testnet.kukai.app', [NetworkType.EDONET]: 'https://edonet.kukai.app', [NetworkType.FLORENCENET]: 'https://florencenet.kukai.app', - [NetworkType.GRANADANET]: 'https://granadanet.kukai.app' + [NetworkType.GRANADANET]: 'https://granadanet.kukai.app', + [NetworkType.HANGZHOUNET]: 'https://hangzhounet.kukai.app' } } ] diff --git a/src/constants.ts b/src/constants.ts index e244ff1dc..6484ae7cf 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,2 +1,2 @@ -export const SDK_VERSION: string = '2.3.2' +export const SDK_VERSION: string = '2.3.3' export const BEACON_VERSION: string = '2' diff --git a/src/events.ts b/src/events.ts index 61f8f2723..14aa0aae6 100644 --- a/src/events.ts +++ b/src/events.ts @@ -229,7 +229,7 @@ const showAcknowledgedToast = async (data: { } const showPrepare = async (data: { walletInfo?: WalletInfo }): Promise => { - const text = data.walletInfo ? `Preparing Request for {{wallet}}...` : 'Preparing Request...' + const text = data.walletInfo ? `Preparing Request for {{wallet}}...` : 'Preparing Request...' openToast({ body: `${text}`, state: 'prepare', diff --git a/src/types/beacon/NetworkType.ts b/src/types/beacon/NetworkType.ts index f2812e134..412a949ad 100644 --- a/src/types/beacon/NetworkType.ts +++ b/src/types/beacon/NetworkType.ts @@ -4,5 +4,6 @@ export enum NetworkType { EDONET = 'edonet', FLORENCENET = 'florencenet', GRANADANET = 'granadanet', + HANGZHOUNET = 'hangzhounet', CUSTOM = 'custom' } diff --git a/src/ui/alert/Pairing.ts b/src/ui/alert/Pairing.ts index 11f60ed22..283b17e95 100644 --- a/src/ui/alert/Pairing.ts +++ b/src/ui/alert/Pairing.ts @@ -53,6 +53,7 @@ export interface WebApp extends AppBase { [NetworkType.EDONET]?: string [NetworkType.FLORENCENET]?: string [NetworkType.GRANADANET]?: string + [NetworkType.HANGZHOUNET]?: string [NetworkType.CUSTOM]?: string } } @@ -339,11 +340,26 @@ export class Pairing { color: app.color, logo: app.logo, enabled: true, - async clickHandler(): Promise { - const code = await serializer.serialize(await pairingCode()) - const link = getTzip10Link(app.links[network] ?? app.links[NetworkType.MAINNET], code) - window.open(link, '_blank') - statusUpdateHandler(WalletType.WEB, this, true) + clickHandler(): void { + const newTab = window.open('', '_blank') + + pairingCode() + .then((code) => serializer.serialize(code)) + .then((code) => { + const link = getTzip10Link(app.links[network] ?? app.links[NetworkType.MAINNET], code) + + if (newTab) { + newTab.location.href = link + } else { + window.open(link, '_blank') + } + + statusUpdateHandler(WalletType.WEB, this, true) + }) + .catch((error) => { + // eslint-disable-next-line no-console + console.error(error) + }) } })) .sort((a, b) => a.key.localeCompare(b.key)) diff --git a/src/utils/tezblock-blockexplorer.ts b/src/utils/tezblock-blockexplorer.ts index 6fe13f773..6dee20868 100644 --- a/src/utils/tezblock-blockexplorer.ts +++ b/src/utils/tezblock-blockexplorer.ts @@ -9,6 +9,7 @@ export class TezblockBlockExplorer extends BlockExplorer { [NetworkType.EDONET]: 'https://edonet.tezblock.io', [NetworkType.FLORENCENET]: 'https://florencenet.tezblock.io', [NetworkType.GRANADANET]: 'https://granadanet.tezblock.io', + [NetworkType.HANGZHOUNET]: 'https://hangzhounet.tezblock.io', [NetworkType.CUSTOM]: 'https://granadanet.tezblock.io' } ) {