Skip to content

Commit 6807d26

Browse files
authored
Merge pull request #1111 from wanderwallet/development
Wander Connect SDK v0.1.13
2 parents 7bd6388 + 6c18d8e commit 6807d26

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

src/utils/embedded/embedded.provider.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,9 +1314,21 @@ export function EmbeddedProvider({ children }: EmbeddedProviderProps) {
13141314
isomorphicOnMessage("embedded_navigate", ({ data }) => {
13151315
const navigate = navigateRef.current;
13161316

1317-
if (data !== "backup" || !navigate) return;
1318-
1319-
navigate("/account/backup-wallet");
1317+
if (!navigate) return;
1318+
1319+
if (data === "backup") {
1320+
navigate("/account/backup-wallet");
1321+
} else if (data === "home") {
1322+
navigate("/");
1323+
} else if (data === "receive") {
1324+
navigate("/wallet/receive/options");
1325+
} else if (data === "receive-address") {
1326+
navigate("/wallet/deposit");
1327+
} else if (data === "buy") {
1328+
navigate("/wallet/buy/cash");
1329+
} else if (data === "transactions") {
1330+
navigate("/wallet/transactions");
1331+
}
13201332
});
13211333
}, []);
13221334

src/wallets/router/iframe/iframe.routes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ import { AccountBackupCloudImportSuccessEmbeddedView } from "~routes/embedded/ac
7676
/**
7777
* Developers can manually navigate to these flows:
7878
*/
79-
export type DirectAccess = "backup";
79+
export type DirectAccess = "backup" | "home" | "receive" | "receive-address" | "buy" | "transactions";
8080

8181
export type EmbeddedRoutePath =
8282
| "/support/unpartitioned-state"

wander-connect-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wanderapp/connect",
3-
"version": "0.1.12",
3+
"version": "0.1.13",
44
"description": "Wander Connect SDK.",
55
"author": "wanderapp",
66
"license": "MIT",

wander-connect-sdk/src/wander-connect.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export type OpenReason = "manually" | "embedded_open" | "embedded_request";
44

55
// Routes and layouts:
66

7-
export type DirectAccess = "backup";
7+
export type DirectAccess = "backup" | "home" | "receive" | "receive-address" | "buy" | "transactions";
88

99
/**
1010
* Types of routes available in the Wander Connect SDK.

0 commit comments

Comments
 (0)