Skip to content

Commit 030c2eb

Browse files
committed
web-wallet: replace migrate menu item with bridge
Resolves #3819
1 parent 891ca60 commit 030c2eb

File tree

8 files changed

+71
-11
lines changed

8 files changed

+71
-11
lines changed

web-wallet/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ N.B. the current `0.1.2` version of the library has no option to pick the networ
3434
# can be empty string, must start with a slash otherwise, must not end with a slash
3535
VITE_BASE_PATH=""
3636
VITE_FEATURE_ALLOCATE=true
37-
VITE_FEATURE_MIGRATE=true
37+
VITE_FEATURE_BRIDGE=true
3838
VITE_FEATURE_STAKE=true
3939
VITE_FEATURE_TRANSFER=true
4040
VITE_FEATURE_TRANSACTION_HISTORY=true
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<svelte:options immutable={true} />
2+
3+
<script>
4+
import { mdiHistory } from "@mdi/js";
5+
6+
import { Icon } from "$lib/dusk/components";
7+
</script>
8+
9+
<article class="bridge">
10+
<header class="bridge__header">
11+
<h3 class="h4">Bridge</h3>
12+
<div class="bridge__header-icons">
13+
<Icon path={mdiHistory} />
14+
</div>
15+
</header>
16+
</article>
17+
18+
<style lang="postcss">
19+
.bridge {
20+
border-radius: 1.25em;
21+
background: var(--surface-color);
22+
display: flex;
23+
flex-direction: column;
24+
gap: var(--default-gap);
25+
padding: 1.25em;
26+
27+
&__header {
28+
display: flex;
29+
justify-content: space-between;
30+
}
31+
32+
&__header-icons {
33+
display: flex;
34+
align-items: center;
35+
gap: 0.675em;
36+
}
37+
}
38+
</style>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export { default as AllocateContract } from "./AllocateContract/AllocateContract.svelte";
2+
export { default as BridgeContract } from "./BridgeContract/BridgeContract.svelte";
23
export { default as MigrateContract } from "./MigrateContract/MigrateContract.svelte";
34
export { default as StakeContract } from "./StakeContract/StakeContract.svelte";

web-wallet/src/lib/contracts/contract-descriptors.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ export default [
5858
},
5959
{
6060
enabled:
61-
import.meta.env.VITE_FEATURE_MIGRATE === "true" &&
61+
import.meta.env.VITE_FEATURE_BRIDGE === "true" &&
6262
import.meta.env.VITE_REOWN_PROJECT_ID !== "",
63-
id: "migrate",
64-
label: "Migrate",
63+
id: "bridge",
64+
label: "Bridge",
6565
operations: [
6666
{
6767
disabled: false,

web-wallet/src/routes/(app)/dashboard/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
case "allocate":
3030
icons = [{ path: mdiSync }];
3131
break;
32-
case "migrate":
32+
case "bridge":
3333
icons = [{ path: mdiSwapHorizontal }];
3434
break;
3535
case "receive":

web-wallet/src/routes/(app)/dashboard/__tests__/__snapshots__/page.spec.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ exports[`Dashboard > should render a card when there is an error getting transac
136136
137137
<a
138138
class="dusk-anchor dusk-anchor--on-surface dashboard-nav__item"
139-
href="migrate"
139+
href="bridge"
140140
role="menuitem"
141141
tabindex="0"
142142
>
143143
<span
144144
class="dashboard-nav__item-label svelte-1opr8zc"
145145
>
146-
Migrate
146+
Bridge
147147
</span>
148148
149149
<span
@@ -366,14 +366,14 @@ exports[`Dashboard > should render the dashboard page with the transactions afte
366366
367367
<a
368368
class="dusk-anchor dusk-anchor--on-surface dashboard-nav__item"
369-
href="migrate"
369+
href="bridge"
370370
role="menuitem"
371371
tabindex="0"
372372
>
373373
<span
374374
class="dashboard-nav__item-label svelte-1opr8zc"
375375
>
376-
Migrate
376+
Bridge
377377
</span>
378378
379379
<span
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<svelte:options immutable={true} />
2+
3+
<script>
4+
import { onDestroy } from "svelte";
5+
import { BridgeContract } from "$lib/containers";
6+
import { operationsStore } from "$lib/stores";
7+
8+
/** @param {string} id */
9+
function updateOperation(id) {
10+
operationsStore.update((store) => ({
11+
...store,
12+
currentOperation: id,
13+
}));
14+
}
15+
16+
onDestroy(() => {
17+
updateOperation("");
18+
});
19+
</script>
20+
21+
<BridgeContract />

web-wallet/vite.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default defineConfig(({ mode }) => {
3030
"process.env": {
3131
MODE_MAINTENANCE: env.VITE_MODE_MAINTENANCE,
3232
VITE_FEATURE_ALLOCATE: env.VITE_FEATURE_ALLOCATE,
33-
VITE_FEATURE_MIGRATE: env.VITE_FEATURE_MIGRATE,
33+
VITE_FEATURE_BRIDGE: env.VITE_FEATURE_BRIDGE,
3434
VITE_FEATURE_STAKE: env.VITE_FEATURE_STAKE,
3535
VITE_FEATURE_TRANSACTION_HISTORY: env.VITE_FEATURE_TRANSACTION_HISTORY,
3636
VITE_FEATURE_TRANSFER: env.VITE_FEATURE_TRANSFER,
@@ -86,7 +86,7 @@ export default defineConfig(({ mode }) => {
8686
APP_BUILD_INFO: "hash1234 2024-01-12",
8787
APP_VERSION: "0.1.5",
8888
VITE_FEATURE_ALLOCATE: "true",
89-
VITE_FEATURE_MIGRATE: "true",
89+
VITE_FEATURE_BRIDGE: "true",
9090
VITE_FEATURE_STAKE: "true",
9191
VITE_FEATURE_TRANSACTION_HISTORY: "true",
9292
VITE_FEATURE_TRANSFER: "true",

0 commit comments

Comments
 (0)