Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenmarcus committed Sep 2, 2024
1 parent edbe3d3 commit 2093eb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion packages/sdk/src/execute/execute.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ export const checkCallbackUrl = (
wallet: Wallet,
outcomes: void | FinalExecutionOutcome[],
): void | FinalExecutionOutcome[] | FinalExecutionOutcome => {
const isNotBrowserWallet = wallet?.type !== 'browser';
const hasCallbackUrl = Boolean(
typeof window !== 'undefined' && callbackUrl?.length > 0,
);

if (hasCallbackUrl) {
if (hasCallbackUrl && isNotBrowserWallet) {
const { transactionHash } = checkTransactionHash(outcomes);

let finalUrl = `${callbackUrl}?transactionHashes=${transactionHash}`;
Expand Down
13 changes: 6 additions & 7 deletions packages/wallet/src/bitte-wallet-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
} from '@near-wallet-selector/core';
import { BitteWallet } from './bitte-wallet';
import { resolveBitteWallet } from './utils';

interface BitteWalletSetup {
callbackUrl?: string;
successUrl?: string;
Expand All @@ -16,9 +16,9 @@ import { resolveBitteWallet } from './utils';
contractId?: string;
lak?: boolean;
}

const icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTUiIGhlaWdodD0iOTUiIHZpZXdCb3g9IjAgMCA5NSA5NSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xLjc3NjE3IDU5LjE4MjZMNjIuNzIyNyA2My4zMTNDNjMuMTE4NSA2My40MzA5IDYzLjQ3ODggNjMuNjQ1NiA2My43NzA4IDYzLjkzNzdDNjQuMDYyOSA2NC4yMjk3IDY0LjI3NzUgNjQuNTg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YwNSAyNi43NjIyIDMxLjU5NDYgMjYuOTQ4IDMxLjQwNTUgMjcuMjAxNkMzMS4yMTY0IDI3LjQ1NTIgMzEuMTE0MyAyNy43NjMxIDMxLjExNDMgMjguMDc5NEMzMS4xMTQzIDI4LjM5NTggMzEuMjE2NCAyOC43MDM3IDMxLjQwNTUgMjguOTU3MkMzMS41OTQ2IDI5LjIxMDggMzEuODYwNSAyOS4zOTY2IDMyLjE2MzcgMjkuNDg2OFoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=';

export function setupBitteWallet({
walletUrl = '',
deprecated = false,
Expand All @@ -27,11 +27,11 @@ import { resolveBitteWallet } from './utils';
callbackUrl = '',
contractId = '',
}: BitteWalletSetup = {}): WalletModuleFactory<BrowserWallet> {

return async (moduleOptions): Promise<WalletModule<BrowserWallet> | null> => {

const wallet: WalletModule<BrowserWallet> = {
id: 'bitte-wallet',
id: 'mintbase-wallet',
type: 'browser',
metadata: {
name: 'Bitte Wallet',
Expand All @@ -51,4 +51,3 @@ import { resolveBitteWallet } from './utils';
return wallet;
};
}

0 comments on commit 2093eb3

Please sign in to comment.