Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to Expo 48 #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,17 @@ const onSignAllTransactionsRedirectLink = Linking.createURL("onSignAllTransactio
const onSignTransactionRedirectLink = Linking.createURL("onSignTransaction");
const onSignMessageRedirectLink = Linking.createURL("onSignMessage");

/**
* If true, uses universal links instead of deep links. This is the recommended way for dapps
* and Phantom to handle deeplinks as we own the phantom.app domain.
*
* Set this to false to use normal deeplinks, starting with phantom://. This is easier for
* debugging with a local build such as Expo Dev Client builds.
*/
const useUniversalLinks = true;

const buildUrl = (path: string, params: URLSearchParams) =>
`https://phantom.app/ul/v1/${path}?${params.toString()}`;
`${useUniversalLinks ? "https://phantom.app/ul/" : "phantom://"}v1/${path}?${params.toString()}`;

const decryptPayload = (data: string, nonce: string, sharedSecret?: Uint8Array) => {
if (!sharedSecret) throw new Error("missing shared secret");
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"engines": {
"node": ">=15.0.0 <17.0.0"
"node": ">= 18.0.0"
},
"scripts": {
"start": "expo start --clear",
Expand All @@ -15,24 +15,24 @@
"dependencies": {
"@solana/web3.js": "~1.35.0",
"buffer": "^6.0.3",
"expo": "~44.0.0",
"expo-linking": "~3.0.0",
"expo-status-bar": "~1.2.0",
"expo-updates": "~0.11.6",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-get-random-values": "^1.7.2",
"expo": "^48.0.0",
"expo-linking": "~4.0.1",
"expo-status-bar": "~1.4.4",
"expo-updates": "~0.16.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.71.3",
"react-native-get-random-values": "~1.8.0",
"react-native-url-polyfill": "^1.3.0",
"react-native-web": "0.17.1",
"react-native-web": "~0.18.11",
"tweetnacl": "^1.0.3"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/core": "^7.20.0",
"@types/bs58": "^4.0.1",
"@types/react": "~17.0.21",
"@types/react": "~18.0.27",
"@types/react-native": "~0.64.12",
"typescript": "~4.3.5"
"typescript": "^4.9.4"
},
"private": true
}
Loading