diff --git a/web-wallet/.eslintignore b/web-wallet/.eslintignore
index 38972655fa..da81b5c351 100644
--- a/web-wallet/.eslintignore
+++ b/web-wallet/.eslintignore
@@ -4,10 +4,11 @@ node_modules
/.svelte-kit
/package
.env
-.env.*
+.env.\*
!.env.example
# Ignore files for PNPM, NPM and YARN
+
pnpm-lock.yaml
package-lock.json
yarn.lock
diff --git a/web-wallet/CHANGELOG.md b/web-wallet/CHANGELOG.md
index f25308d9ce..bf490f79cc 100644
--- a/web-wallet/CHANGELOG.md
+++ b/web-wallet/CHANGELOG.md
@@ -9,12 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
+- Add option to sync from a custom block height on Wallet Restoration [#1568]
+- Show current block height on Wallet Creation [#1561]
- Added gas settings validation on Unstake / Widthdraw Rewards flows [#2000]
- Added allocation (shield/unshield) page and UI [#2196]
- Added token migration contract bindings [#2014]
### Changed
+- Newly created Wallet does not sync from genesis [#1567]
- Update font-display to swap for custom fonts to improve performance [#2026]
- Update anchor colors to ensure better accessibility [#1765]
- Update Transactions list design [#1922]
@@ -229,7 +232,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#1545]: https://github.com/dusk-network/rusk/issues/1545
[#1547]: https://github.com/dusk-network/rusk/issues/1547
[#1552]: https://github.com/dusk-network/rusk/issues/1552
+[#1561]: https://github.com/dusk-network/rusk/issues/1561
[#1565]: https://github.com/dusk-network/rusk/issues/1565
+[#1568]: https://github.com/dusk-network/rusk/issues/1568
+[#1567]: https://github.com/dusk-network/rusk/issues/1567
[#1576]: https://github.com/dusk-network/rusk/issues/1576
[#1591]: https://github.com/dusk-network/rusk/issues/1591
[#1598]: https://github.com/dusk-network/rusk/issues/1598
diff --git a/web-wallet/__mocks__/Wallet.js b/web-wallet/__mocks__/Wallet.js
index f465ef3a98..5dd33981e6 100644
--- a/web-wallet/__mocks__/Wallet.js
+++ b/web-wallet/__mocks__/Wallet.js
@@ -1,13 +1,13 @@
class Wallet {
- constructor(seed, gasLimit = 2900000000, gasPrice = 1) {
- this.gasLimit = gasLimit;
- this.gasPrice = gasPrice;
+ constructor(seed) {
this.seed = seed;
this.wasm = {};
}
- gasLimit;
- gasPrice;
+ static get networkBlockHeight() {
+ return Promise.resolve(0);
+ }
+
seed;
wasm;
diff --git a/web-wallet/package-lock.json b/web-wallet/package-lock.json
index b1791d9954..c5186cbbfc 100644
--- a/web-wallet/package-lock.json
+++ b/web-wallet/package-lock.json
@@ -9,7 +9,7 @@
"version": "0.5.0",
"license": "MPL-2.0",
"dependencies": {
- "@dusk-network/dusk-wallet-js": "0.4.2",
+ "@dusk-network/dusk-wallet-js": "0.5.3",
"@floating-ui/dom": "1.6.5",
"@mdi/js": "7.4.47",
"@wagmi/connectors": "5.1.6",
@@ -2223,12 +2223,12 @@
}
},
"node_modules/@dusk-network/dusk-wallet-js": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/@dusk-network/dusk-wallet-js/-/dusk-wallet-js-0.4.2.tgz",
- "integrity": "sha512-9Jy/Amm4oKkPvjw9/xo7/RRwm9U6fRobkFArVcPXwN5sL2uz6/UPd7b6w4X5bBTrdEyCZHNBwtslmwAHrwV6dA==",
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@dusk-network/dusk-wallet-js/-/dusk-wallet-js-0.5.3.tgz",
+ "integrity": "sha512-HXjAewHCYL6zg65V0QaUY/xC9kkQhUs5mu+d+/3ljsRfz4mXu1fGY7pb46Kbd7lbfd7LFyBguLaQeF4ZexXfKQ==",
"license": "MPL",
"dependencies": {
- "dexie": "3.2.4",
+ "dexie": "3.2.7",
"fake-indexeddb": "5.0.1"
}
},
@@ -9880,9 +9880,9 @@
"license": "MIT"
},
"node_modules/dexie": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/dexie/-/dexie-3.2.4.tgz",
- "integrity": "sha512-VKoTQRSv7+RnffpOJ3Dh6ozknBqzWw/F3iqMdsZg958R0AS8AnY9x9d1lbwENr0gzeGJHXKcGhAMRaqys6SxqA==",
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/dexie/-/dexie-3.2.7.tgz",
+ "integrity": "sha512-2a+BXvVhY5op+smDRLxeBAivE7YcYaneXJ1la3HOkUfX9zKkE/AJ8CNgjiXbtXepFyFmJNGSbmjOwqbT749r/w==",
"license": "Apache-2.0",
"engines": {
"node": ">=6.0"
diff --git a/web-wallet/package.json b/web-wallet/package.json
index 677807431a..f363750a79 100644
--- a/web-wallet/package.json
+++ b/web-wallet/package.json
@@ -35,7 +35,7 @@
"type": "module",
"version": "0.5.0",
"dependencies": {
- "@dusk-network/dusk-wallet-js": "0.4.2",
+ "@dusk-network/dusk-wallet-js": "0.5.3",
"@floating-ui/dom": "1.6.5",
"@mdi/js": "7.4.47",
"@wagmi/connectors": "5.1.6",
diff --git a/web-wallet/src/__mocks__/mockedWalletStore.js b/web-wallet/src/__mocks__/mockedWalletStore.js
index bd2c41e7bd..53d16880ae 100644
--- a/web-wallet/src/__mocks__/mockedWalletStore.js
+++ b/web-wallet/src/__mocks__/mockedWalletStore.js
@@ -9,9 +9,8 @@ const content = {
addresses,
balance,
currentAddress,
- error: null,
initialized: true,
- isSyncing: false,
+ syncStatus: { current: 0, error: null, isInProgress: false, last: 0 },
};
const mockedWalletStore = mockReadableStore(content);
diff --git a/web-wallet/src/lib/components/CopyField/CopyField.css b/web-wallet/src/lib/components/CopyField/CopyField.css
new file mode 100644
index 0000000000..f2abfc791b
--- /dev/null
+++ b/web-wallet/src/lib/components/CopyField/CopyField.css
@@ -0,0 +1,9 @@
+.copy-field {
+ display: flex;
+ align-items: center;
+ gap: var(--default-gap);
+}
+
+.copy-field__content {
+ flex: 1;
+}
diff --git a/web-wallet/src/lib/components/CopyField/CopyField.svelte b/web-wallet/src/lib/components/CopyField/CopyField.svelte
new file mode 100644
index 0000000000..9758174535
--- /dev/null
+++ b/web-wallet/src/lib/components/CopyField/CopyField.svelte
@@ -0,0 +1,55 @@
+
Data will load after a successful sync.
diff --git a/web-wallet/src/lib/contracts/__tests__/executeSend.spec.js b/web-wallet/src/lib/contracts/__tests__/executeSend.spec.js index f6588c1f6b..ddcc08531b 100644 --- a/web-wallet/src/lib/contracts/__tests__/executeSend.spec.js +++ b/web-wallet/src/lib/contracts/__tests__/executeSend.spec.js @@ -43,7 +43,10 @@ describe("executeSend", () => { await executeSend(...args); expect(walletStore.transfer).toHaveBeenCalledTimes(1); - expect(walletStore.transfer).toHaveBeenCalledWith(...args); + expect(walletStore.transfer).toHaveBeenCalledWith("abc", 1000, { + limit: 2, + price: 1, + }); expect(getLastTransactionHash).toHaveBeenCalledTimes(1); }); diff --git a/web-wallet/src/lib/contracts/executeSend.js b/web-wallet/src/lib/contracts/executeSend.js index 6bc3e4cc63..d9756ca921 100644 --- a/web-wallet/src/lib/contracts/executeSend.js +++ b/web-wallet/src/lib/contracts/executeSend.js @@ -4,7 +4,7 @@ import { walletStore } from "$lib/stores"; /** @type {(to: string, amount: number, gasPrice:number, gasLimit:number) => Promise