feat: migrate paper wallet to embedded wallets (#1878)

* feat: add embedded wallet to thirdweb connect

* chore: update react pacakge to use the latest wallet items

* chore: update .env.example

* chore: remove paper wallet

---------

Signed-off-by: Winston Yeo <[email protected]>
This commit is contained in:
Winston Yeo
2023-10-31 23:08:09 +00:00
committed by GitHub
parent 89d1cb29f2
commit 8e93ece278
4 changed files with 93 additions and 27 deletions
+4 -1
View File
@@ -68,4 +68,7 @@ HUBSPOT_ACCESS_TOKEN=
# Github API Token (used for /open-source)
GITHUB_API_TOKEN="ghp_..."
GITHUB_API_TOKEN="ghp_..."
# Disable telemetry
NEXT_TELEMETRY_DISABLED=1
+4 -8
View File
@@ -1,4 +1,3 @@
import { THIRDWEB_API_HOST, THIRDWEB_DOMAIN } from "../../constants/urls";
import {
EVMContractInfo,
useEVMContractInfo,
@@ -8,13 +7,13 @@ import { useQueryClient } from "@tanstack/react-query";
import {
ThirdwebProvider,
coinbaseWallet,
embeddedWallet,
localWallet,
metamaskWallet,
paperWallet,
phantomWallet,
rainbowWallet,
safeWallet,
trustWallet,
phantomWallet,
walletConnect,
zerionWallet,
} from "@thirdweb-dev/react";
@@ -32,6 +31,7 @@ import { getDashboardChainRpc } from "lib/rpc";
import { StorageSingleton } from "lib/sdk";
import { useEffect, useMemo } from "react";
import { ComponentWithChildren } from "types/component-with-children";
import { THIRDWEB_API_HOST, THIRDWEB_DOMAIN } from "../../constants/urls";
export interface DashboardThirdwebProviderProps {
contractInfo?: EVMContractInfo;
@@ -51,11 +51,7 @@ const personalWallets = [
trustWallet(),
zerionWallet(),
phantomWallet(),
paperWallet({
paperClientId: "9a2f6238-c441-4bf4-895f-d13c2faf2ddb",
advancedOptions: {
recoveryShareManagement: "AWS_MANAGED",
},
embeddedWallet({
onAuthSuccess: ({ storedToken }) => {
// expose paper auth token for onboarding screens to pick up and clear up
(window as any)[GLOBAL_PAPER_AUTH_TOKEN_KEY] = storedToken.cookieString;
+1 -1
View File
@@ -33,7 +33,7 @@
"@tanstack/react-table": "^8.10.7",
"@thirdweb-dev/auth": "4.1.1-nightly-cc651135-20231023133010",
"@thirdweb-dev/chains": "0.1.56-nightly-cc651135-20231023133010",
"@thirdweb-dev/react": "4.0.9-nightly-cc651135-20231023133010",
"@thirdweb-dev/react": "0.0.0-dev-9ffd068-20231031171730",
"@thirdweb-dev/sdk": "4.0.8-nightly-cc651135-20231023133010",
"@thirdweb-dev/service-utils": "^0.4.7",
"@vercel/og": "^0.5.20",
+84 -17
View File
@@ -3628,6 +3628,18 @@
resolved "https://registry.yarnpkg.com/@tanstack/table-core/-/table-core-8.10.7.tgz#577e8a635048875de4c9d6d6a3c21d26ff9f9d08"
integrity sha512-KQk5OMg5OH6rmbHZxuNROvdI+hKDIUxANaHlV+dPlNN7ED3qYQ/WkpY2qlXww1SIdeMlkIhpN/2L00rof0fXFw==
"@thirdweb-dev/[email protected]":
version "0.0.0-dev-9ffd068-20231031171730"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/auth/-/auth-0.0.0-dev-9ffd068-20231031171730.tgz#691cc113d9542ddc162f81eae5db81a18f71c97e"
integrity sha512-ZCnl9gL2HVprAj25g6RUUt/JcdUWXsNRBK0Cu9VNcTVrl+wQsDGzPgrT2EP2TvqaYU8/3uTas9oEiqWZisRQ4Q==
dependencies:
"@fastify/cookie" "^9.1.0"
"@thirdweb-dev/wallets" "0.0.0-dev-9ffd068-20231031171730"
cookie "^0.5.0"
fastify-type-provider-zod "^1.1.9"
uuid "^9.0.1"
zod "^3.22.3"
"@thirdweb-dev/[email protected]":
version "4.1.1-nightly-cc651135-20231023133010"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/auth/-/auth-4.1.1-nightly-cc651135-20231023133010.tgz#8ad5e0d6266916c989b27982032113ef15b584c2"
@@ -3645,6 +3657,11 @@
resolved "https://registry.yarnpkg.com/@thirdweb-dev/chains/-/chains-0.1.56-nightly-cc651135-20231023133010.tgz#9ffc0a12a7cbc114a86fac930f7563e4c09c44e5"
integrity sha512-mTKq9wLT3nBXfoojwpTg5peqDRgB7wxCuGgI3Us1PbCuLfBmn1+s+7ndvozeoxLQZzzrrcm21TtjTr9X9MsAHA==
"@thirdweb-dev/[email protected]":
version "0.1.57"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/chains/-/chains-0.1.57.tgz#744b19a9a1e5f9ec7e6a9a43ba8091273c7ab0b6"
integrity sha512-2q49UaeWN6PEXdSwIDEQA9Cp3Sw3sezlSiYuSVoQjwfxmVWLqeqidP2mJQGoUzNfxpWggvlZf7vYGgDjGjoAhA==
"@thirdweb-dev/[email protected]":
version "1.3.16"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/contracts-js/-/contracts-js-1.3.16.tgz#264727b40b0f320c01eefcb4295e89c9e9947002"
@@ -3673,25 +3690,25 @@
resolved "https://registry.yarnpkg.com/@thirdweb-dev/generated-abis/-/generated-abis-0.0.1.tgz#0d788d6aff0ac08f11e9eeb9ae4c8321845272a8"
integrity sha512-vO9/3lSLO8smyyH1QVeYravSTzFwV1nf1C/Im1NBDPdH8//YvcbhtETGGiNfHWpyCvSi0vRYwvf+/7FKdwpDGQ==
"@thirdweb-dev/react-core@4.0.9-nightly-cc651135-20231023133010":
version "4.0.9-nightly-cc651135-20231023133010"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react-core/-/react-core-4.0.9-nightly-cc651135-20231023133010.tgz#af80e2a56c50813aade86f7f219f5cab07ea3237"
integrity sha512-1w6Cag2fArnD0Nho6j+39yYPtk2BbsYFENnN9QB6Cz6aCPTv1TZz24FRPwrfw1uodtpVIvqBZBgCU//F/Cs2kA==
"@thirdweb-dev/react-core@0.0.0-dev-9ffd068-20231031171730":
version "0.0.0-dev-9ffd068-20231031171730"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react-core/-/react-core-0.0.0-dev-9ffd068-20231031171730.tgz#27cbb1adeedfd9c7c74ee7b11e83cc265c3c10c9"
integrity sha512-jZRD3FcxFhnmxY935VkNSCcJHCf/9xYCHmmBPP1aa56oJQIZ+RVj+K6oH3opZhMszvGiD10qvdNLMOQ0VA7NGg==
dependencies:
"@tanstack/react-query" "^4.33.0"
"@thirdweb-dev/auth" "4.1.1-nightly-cc651135-20231023133010"
"@thirdweb-dev/chains" "0.1.56-nightly-cc651135-20231023133010"
"@thirdweb-dev/auth" "0.0.0-dev-9ffd068-20231031171730"
"@thirdweb-dev/chains" "0.1.57"
"@thirdweb-dev/generated-abis" "^0.0.1"
"@thirdweb-dev/sdk" "4.0.8-nightly-cc651135-20231023133010"
"@thirdweb-dev/storage" "2.0.1"
"@thirdweb-dev/wallets" "2.0.9-nightly-cc651135-20231023133010"
"@thirdweb-dev/sdk" "4.0.9"
"@thirdweb-dev/storage" "2.0.2"
"@thirdweb-dev/wallets" "0.0.0-dev-9ffd068-20231031171730"
mime "3.0.0"
tiny-invariant "^1.2.0"
"@thirdweb-dev/react@4.0.9-nightly-cc651135-20231023133010":
version "4.0.9-nightly-cc651135-20231023133010"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react/-/react-4.0.9-nightly-cc651135-20231023133010.tgz#867cddbfbc91f8faecf573717710655791136982"
integrity sha512-UiyfHk1hoId49voe6HvhwNDHnz+aqK70Nd8x8wtMr92U5pcsrHvBdMolzYCGu6GNXFHXtUVU+5iXYnHtZ2FWHw==
"@thirdweb-dev/react@0.0.0-dev-9ffd068-20231031171730":
version "0.0.0-dev-9ffd068-20231031171730"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react/-/react-0.0.0-dev-9ffd068-20231031171730.tgz#1126593f563221dad739606ed90de6a373a868da"
integrity sha512-uk16LF4D1rOzPNvIm/QG0o5ydh69u75jFWnhdwd54bKiZBfB7Ka+qniW607fYa9DV3TOQOK1XkaRe+3Ay+LaFw==
dependencies:
"@emotion/react" "^11.11.1"
"@emotion/styled" "^11.11.0"
@@ -3705,9 +3722,9 @@
"@radix-ui/react-tooltip" "^1.0.6"
"@react-icons/all-files" "^4.1.0"
"@tanstack/react-query" "^4.33.0"
"@thirdweb-dev/chains" "0.1.56-nightly-cc651135-20231023133010"
"@thirdweb-dev/react-core" "4.0.9-nightly-cc651135-20231023133010"
"@thirdweb-dev/wallets" "2.0.9-nightly-cc651135-20231023133010"
"@thirdweb-dev/chains" "0.1.57"
"@thirdweb-dev/react-core" "0.0.0-dev-9ffd068-20231031171730"
"@thirdweb-dev/wallets" "0.0.0-dev-9ffd068-20231031171730"
buffer "^6.0.3"
copy-to-clipboard "^3.3.2"
detect-browser "^5.3.0"
@@ -3715,7 +3732,7 @@
qrcode "^1.5.3"
tiny-invariant "^1.2.0"
"@thirdweb-dev/[email protected]":
"@thirdweb-dev/[email protected]", "@thirdweb-dev/[email protected]":
version "4.0.8-nightly-cc651135-20231023133010"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/sdk/-/sdk-4.0.8-nightly-cc651135-20231023133010.tgz#f17f54ac5f9e0c3c1f7568e8e7f7ba4cf421ed6c"
integrity sha512-uc5brA+OYReHaCvhESGMGL/6rnIEOw549gKUNCuivLqxGrLtliLqstHSS5U0J9WP8ZQZoMIgxwlgt5b66CezNA==
@@ -3754,6 +3771,56 @@
form-data "^4.0.0"
uuid "^9.0.1"
"@thirdweb-dev/[email protected]":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/storage/-/storage-2.0.2.tgz#813d2da87ff864ae97992e3f7d91fb1c384b7071"
integrity sha512-idi0fWy2G9M5kAr4RdfoFwKtIBMNe+h4oUXX/zyCi8CKQ4ruBPku1+3nA9Z7pXSUbEt7JpPIvIJGu063OnyPTg==
dependencies:
cid-tool "^3.0.0"
form-data "^4.0.0"
uuid "^9.0.1"
"@thirdweb-dev/[email protected]":
version "0.0.0-dev-9ffd068-20231031171730"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/wallets/-/wallets-0.0.0-dev-9ffd068-20231031171730.tgz#de3beb761ccbcb80c784592bc202dec314b2f80d"
integrity sha512-fJjGambiIo/B4aEFHDSVL2QW/FUKpA2cR5Cdz4lDRPuyjK8ibtuop6bfXdOfVT1UVSug2vAf7nL1ySvTAlLapA==
dependencies:
"@account-abstraction/contracts" "^0.5.0"
"@account-abstraction/sdk" "^0.5.0"
"@account-abstraction/utils" "^0.5.0"
"@blocto/sdk" "^0.5.4"
"@coinbase/wallet-sdk" "^3.7.1"
"@google-cloud/kms" "3.0.1"
"@magic-ext/connect" "^6.7.2"
"@magic-ext/oauth" "^7.6.2"
"@magic-sdk/provider" "^13.6.2"
"@metamask/eth-sig-util" "^4.0.0"
"@paperxyz/embedded-wallet-service-sdk" "^1.2.5"
"@paperxyz/sdk-common-utilities" "^0.1.0"
"@safe-global/safe-core-sdk" "^3.3.4"
"@safe-global/safe-ethers-adapters" "0.1.0-alpha.17"
"@safe-global/safe-ethers-lib" "^1.9.4"
"@thirdweb-dev/chains" "0.1.57"
"@thirdweb-dev/contracts-js" "1.3.16"
"@thirdweb-dev/sdk" "4.0.9"
"@walletconnect/core" "^2.9.1"
"@walletconnect/ethereum-provider" "^2.9.1"
"@walletconnect/jsonrpc-utils" "^1.0.8"
"@walletconnect/modal" "^2.6.1"
"@walletconnect/types" "^2.9.1"
"@walletconnect/utils" "^2.10.2"
"@walletconnect/web3wallet" "^1.8.7"
asn1.js "5.4.1"
bn.js "5.2.0"
buffer "^6.0.3"
crypto-js "^4.1.1"
eth-provider "^0.13.6"
ethereumjs-util "^7.1.3"
eventemitter3 "^5.0.1"
key-encoder "2.0.3"
magic-sdk "^13.6.2"
web3-core "1.5.2"
"@thirdweb-dev/[email protected]":
version "2.0.9-nightly-cc651135-20231023133010"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/wallets/-/wallets-2.0.9-nightly-cc651135-20231023133010.tgz#5355ad1a8d8ed6a46450699cdf40a59162d6826a"