From 7826ebf1b7d1aac5a0d214e07e5b2d7e9e578f94 Mon Sep 17 00:00:00 2001 From: Ruben Marcus Date: Tue, 20 Feb 2024 13:27:40 +0000 Subject: [PATCH] add contractId on sign in (#478) --- package-lock.json | 26 +++++++++++++------------- packages/react/package.json | 2 +- packages/react/src/wallet/wallet.ts | 2 ++ packages/wallet/src/mintbase-wallet.ts | 1 + 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9727b54f..f7efce5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26670,7 +26670,7 @@ }, "packages/auth": { "name": "@mintbase-js/auth", - "version": "0.5.5-beta.3", + "version": "0.5.5-beta-prerelease.1", "license": "MIT", "dependencies": { "@mintbase-js/sdk": "0.5.2-beta.0", @@ -26715,7 +26715,7 @@ }, "packages/data": { "name": "@mintbase-js/data", - "version": "0.5.5-beta.3", + "version": "0.5.5-beta-prerelease.1", "license": "MIT", "dependencies": { "@mintbase-js/sdk": "^0.5.2-beta.0", @@ -26747,10 +26747,10 @@ }, "packages/react": { "name": "@mintbase-js/react", - "version": "0.5.5-beta.3", + "version": "0.5.5-beta-prerelease.1", "license": "MIT", "dependencies": { - "@mintbase-js/wallet": "0.5.5-fix-success-url-issue-765a756.0", + "@mintbase-js/wallet": "0.5.5-add-contractId-on-signin-84d0c9f.0", "@near-wallet-selector/core": "8.9.3", "@near-wallet-selector/here-wallet": "8.9.3", "@near-wallet-selector/meteor-wallet": "8.9.3", @@ -26765,9 +26765,9 @@ } }, "packages/react/node_modules/@mintbase-js/wallet": { - "version": "0.5.5-fix-success-url-issue-765a756.0", - "resolved": "https://registry.npmjs.org/@mintbase-js/wallet/-/wallet-0.5.5-fix-success-url-issue-765a756.0.tgz", - "integrity": "sha512-ooojRMJRUExlrayx1Z+0G9ZIf/6gA99nVDn5QQATsQZdnPsyLMAiBjjM/hsTJRUzMAU3JmobeEyJ2SKtIOmb6w==", + "version": "0.5.5-add-contractId-on-signin-84d0c9f.0", + "resolved": "https://registry.npmjs.org/@mintbase-js/wallet/-/wallet-0.5.5-add-contractId-on-signin-84d0c9f.0.tgz", + "integrity": "sha512-pJxqUCY04vdB8zBvTHOdOA9MNhMFhYhXM7xhGrUEOWjY8WhZbPdaBQv4lczKlb6wPfqM+fSMI0K3TGuG99gIAA==", "dependencies": { "@near-wallet-selector/core": "8.9.3", "bn.js": "^5.2.1", @@ -26776,7 +26776,7 @@ }, "packages/rpc": { "name": "@mintbase-js/rpc", - "version": "0.5.5-beta.3", + "version": "0.5.5-beta-prerelease.1", "license": "MIT", "dependencies": { "@mintbase-js/sdk": "0.5.2-beta.0", @@ -26807,7 +26807,7 @@ }, "packages/sdk": { "name": "@mintbase-js/sdk", - "version": "0.5.5-beta.3", + "version": "0.5.5-beta-prerelease.1", "license": "MIT", "dependencies": { "bn.js": "5.2.1", @@ -26819,7 +26819,7 @@ }, "packages/storage": { "name": "@mintbase-js/storage", - "version": "0.5.5-beta.3", + "version": "0.5.5-beta-prerelease.1", "license": "MIT", "dependencies": { "@mintbase-js/sdk": "0.5.2-beta.0", @@ -26840,12 +26840,12 @@ }, "packages/testing": { "name": "@mintbase-js/testing", - "version": "0.5.5-beta.3", + "version": "0.5.5-beta-prerelease.1", "license": "MIT", "dependencies": { "@google-cloud/firestore": "^6.8.0", "@google-cloud/secret-manager": "^4.2.2", - "@mintbase-js/auth": "^0.5.5-beta.3", + "@mintbase-js/auth": "^0.5.5-beta-prerelease.1", "@mintbase-js/sdk": "^0.3.2-upgrade-packages-3378beb.0", "graphql-request": "^5.2.0" }, @@ -26915,7 +26915,7 @@ }, "packages/wallet": { "name": "@mintbase-js/wallet", - "version": "0.5.5-beta.3", + "version": "0.5.5-beta-prerelease.1", "license": "MIT", "dependencies": { "@near-wallet-selector/core": "8.9.3", diff --git a/packages/react/package.json b/packages/react/package.json index 5ce274b9..d168bfc2 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -23,7 +23,7 @@ "@testing-library/user-event": "^14.5.2" }, "dependencies": { - "@mintbase-js/wallet": "0.5.5-fix-success-url-issue-765a756.0", + "@mintbase-js/wallet": "0.5.5-add-contractId-on-signin-84d0c9f.0", "@near-wallet-selector/core": "8.9.3", "@near-wallet-selector/here-wallet": "8.9.3", "@near-wallet-selector/meteor-wallet": "8.9.3", diff --git a/packages/react/src/wallet/wallet.ts b/packages/react/src/wallet/wallet.ts index 3f2d2c49..84f30bc3 100644 --- a/packages/react/src/wallet/wallet.ts +++ b/packages/react/src/wallet/wallet.ts @@ -85,6 +85,7 @@ export const setupMintbaseWalletSelector = async ( callbackUrl: callbackUrl, successUrl: successUrl || window.location.href, failureUrl: successUrl || window.location.href, + contractId: contractAddress, }), ...(options?.additionalWallets || []), ...SUPPORTED_NEAR_WALLETS, @@ -97,6 +98,7 @@ export const setupMintbaseWalletSelector = async ( setupMintbaseWallet({ walletUrl: walletUrls[network], callbackUrl: callbackUrl, + contractId: contractAddress, }), ...(options?.additionalWallets || []), ], diff --git a/packages/wallet/src/mintbase-wallet.ts b/packages/wallet/src/mintbase-wallet.ts index 42556c14..add28ba5 100644 --- a/packages/wallet/src/mintbase-wallet.ts +++ b/packages/wallet/src/mintbase-wallet.ts @@ -122,6 +122,7 @@ export const MintbaseWallet: WalletBehaviourFactory< methodNames: [], successUrl: successUrl || href, failureUrl: failureUrl || href, + contractId: contractId, }); return getAccounts();