diff --git a/package-lock.json b/package-lock.json
index 62257683..95004ec9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -30,6 +30,7 @@
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
+ "react-query": "^3.39.3",
"react-redux": "^8.1.3",
"react-youtube": "^10.1.0",
"redux": "^4.2.1",
@@ -3447,6 +3448,14 @@
"version": "1.1.4",
"license": "MIT"
},
+ "node_modules/big-integer": {
+ "version": "1.6.52",
+ "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz",
+ "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
"node_modules/bn.js": {
"version": "5.2.1",
"license": "MIT"
@@ -3469,6 +3478,21 @@
"node": ">=8"
}
},
+ "node_modules/broadcast-channel": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/broadcast-channel/-/broadcast-channel-3.7.0.tgz",
+ "integrity": "sha512-cIAKJXAxGJceNZGTZSBzMxzyOn72cVgPnKx4dc6LRjQgbaJUQqhy5rzL3zbMxkMWsGKkv2hSFkPRMEXfoMZ2Mg==",
+ "dependencies": {
+ "@babel/runtime": "^7.7.2",
+ "detect-node": "^2.1.0",
+ "js-sha3": "0.8.0",
+ "microseconds": "0.2.0",
+ "nano-time": "1.0.0",
+ "oblivious-set": "1.0.0",
+ "rimraf": "3.0.2",
+ "unload": "2.2.0"
+ }
+ },
"node_modules/brorand": {
"version": "1.1.0",
"license": "MIT"
@@ -3806,6 +3830,11 @@
"node": ">=6"
}
},
+ "node_modules/detect-node": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
+ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g=="
+ },
"node_modules/detect-node-es": {
"version": "1.1.0",
"license": "MIT"
@@ -5445,6 +5474,15 @@
"node": ">=12"
}
},
+ "node_modules/match-sorter": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/match-sorter/-/match-sorter-6.3.1.tgz",
+ "integrity": "sha512-mxybbo3pPNuA+ZuCUhm5bwNkXrJTbsk5VWbR5wiwz/GC6LIiegBGn2w3O08UG/jdbYLinw51fSQ5xNU1U3MgBw==",
+ "dependencies": {
+ "@babel/runtime": "^7.12.5",
+ "remove-accents": "0.4.2"
+ }
+ },
"node_modules/merge2": {
"version": "1.4.1",
"license": "MIT",
@@ -5463,6 +5501,11 @@
"node": ">=8.6"
}
},
+ "node_modules/microseconds": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/microseconds/-/microseconds-0.2.0.tgz",
+ "integrity": "sha512-n7DHHMjR1avBbSpsTBj6fmMGh2AGrifVV4e+WYc3Q9lO+xnSZ3NyhcBND3vzzatt05LFhoKFRxrIyklmLlUtyA=="
+ },
"node_modules/minimalistic-assert": {
"version": "1.0.1",
"license": "ISC"
@@ -5502,6 +5545,14 @@
"version": "2.1.2",
"license": "MIT"
},
+ "node_modules/nano-time": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/nano-time/-/nano-time-1.0.0.tgz",
+ "integrity": "sha512-flnngywOoQ0lLQOTRNexn2gGSNuM9bKj9RZAWSzhQ+UJYaAFG9bac4DW9VHjUAzrOaIcajHybCTHe/bkvozQqA==",
+ "dependencies": {
+ "big-integer": "^1.6.16"
+ }
+ },
"node_modules/nanoid": {
"version": "3.3.7",
"funding": [
@@ -5627,6 +5678,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/oblivious-set": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.0.0.tgz",
+ "integrity": "sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw=="
+ },
"node_modules/once": {
"version": "1.4.0",
"license": "ISC",
@@ -5996,6 +6052,31 @@
"version": "16.13.1",
"license": "MIT"
},
+ "node_modules/react-query": {
+ "version": "3.39.3",
+ "resolved": "https://registry.npmjs.org/react-query/-/react-query-3.39.3.tgz",
+ "integrity": "sha512-nLfLz7GiohKTJDuT4us4X3h/8unOh+00MLb2yJoGTPjxKs2bc1iDhkNx2bd5MKklXnOD3NrVZ+J2UXujA5In4g==",
+ "dependencies": {
+ "@babel/runtime": "^7.5.5",
+ "broadcast-channel": "^3.4.1",
+ "match-sorter": "^6.0.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "react-dom": {
+ "optional": true
+ },
+ "react-native": {
+ "optional": true
+ }
+ }
+ },
"node_modules/react-redux": {
"version": "8.1.3",
"license": "MIT",
@@ -6220,6 +6301,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/remove-accents": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/remove-accents/-/remove-accents-0.4.2.tgz",
+ "integrity": "sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA=="
+ },
"node_modules/require-directory": {
"version": "2.1.1",
"license": "MIT",
@@ -6835,6 +6921,15 @@
"version": "5.26.5",
"license": "MIT"
},
+ "node_modules/unload": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/unload/-/unload-2.2.0.tgz",
+ "integrity": "sha512-B60uB5TNBLtN6/LsgAf3udH9saB5p7gqJwcFfbOEZ8BcBHnGwCf6G/TGiEqkRAxX7zAFIUtzdrXQSdL3Q/wqNA==",
+ "dependencies": {
+ "@babel/runtime": "^7.6.2",
+ "detect-node": "^2.0.4"
+ }
+ },
"node_modules/update-browserslist-db": {
"version": "1.0.13",
"dev": true,
diff --git a/package.json b/package.json
index 4e21eddd..16c49432 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,7 @@
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
+ "react-query": "^3.39.3",
"react-redux": "^8.1.3",
"react-youtube": "^10.1.0",
"redux": "^4.2.1",
diff --git a/public/images/logos/metamask-logo.svg b/public/images/logos/metamask-logo.svg
index bcf96f88..48ea1775 100644
--- a/public/images/logos/metamask-logo.svg
+++ b/public/images/logos/metamask-logo.svg
@@ -219,4 +219,4 @@
-
\ No newline at end of file
+
diff --git a/src/app/app.tsx b/src/app/app.tsx
index 22e83064..0d43afc7 100644
--- a/src/app/app.tsx
+++ b/src/app/app.tsx
@@ -1,3 +1,4 @@
+import { QueryClient, QueryClientProvider } from "react-query";
import { Route } from "react-router-dom";
import { AppLayout } from "@components/app.layout";
@@ -8,15 +9,19 @@ import { About } from "./pages/about/about";
import { Dashboard } from "./pages/dashboard/dashboard";
import { BlockchainContextProvider } from "./providers/blockchain-context-provider";
+const queryClient = new QueryClient();
+
export function App(): React.JSX.Element {
return (
-
-
- } />
- } />
- } />
-
-
-
+
+
+
+ } />
+ } />
+ } />
+
+
+
+
);
}
diff --git a/src/app/components/account/account.tsx b/src/app/components/account/account.tsx
index d51383a0..59c29efc 100644
--- a/src/app/components/account/account.tsx
+++ b/src/app/components/account/account.tsx
@@ -7,6 +7,7 @@ import { Wallet, WalletType, ethereumWallets } from "@models/wallet";
import { RootState } from "@store/index";
import { accountActions } from "@store/slices/account/account.actions";
import { modalActions } from "@store/slices/modal/modal.actions";
+import { mintUnmintActions } from "@store/slices/mintunmint/mintunmint.actions";
function findWalletById(walletType: WalletType): Wallet | undefined {
const wallet = ethereumWallets.find((wallet) => wallet.id === walletType);
@@ -32,6 +33,7 @@ export function Account(): React.JSX.Element {
function onDisconnectWalletClick(): void {
dispatch(accountActions.logout());
+ dispatch(mintUnmintActions.resetMintUnmintState());
}
return (
diff --git a/src/app/components/mint-unmint/components/transaction-summary/transaction-summary.tsx b/src/app/components/mint-unmint/components/transaction-summary/transaction-summary.tsx
index 31065f61..c0256e5d 100644
--- a/src/app/components/mint-unmint/components/transaction-summary/transaction-summary.tsx
+++ b/src/app/components/mint-unmint/components/transaction-summary/transaction-summary.tsx
@@ -12,7 +12,7 @@ interface FlowPropertyMap {
[key: string]: {
[key: number]: {
title: string;
- subtitle: string;
+ subtitle?: string;
};
};
}
@@ -20,14 +20,14 @@ interface FlowPropertyMap {
const flowPropertyMap: FlowPropertyMap = {
mint: {
2: { title: "a) Locking BTC in progress", subtitle: "Minting dlcBTC" },
- 3: { title: "Minted dlcBTC", subtitle: "Minting dlcBTC" },
+ 3: { title: "Minted dlcBTC" },
},
unmint: {
1: {
title: "a) Closing vault in progress",
subtitle: "Your BTC is being unlocked",
},
- 2: { title: "Vault closed", subtitle: "Your BTC is unlocked" },
+ 2: { title: "Vault closed" },
},
};
@@ -51,10 +51,8 @@ export function TransactionSummary({
function getVault(flow: "mint" | "unmint", currentStep: number) {
if (flow === "mint") {
- console.log("fundedVaults", fundedVaults[0]);
return currentStep === 2 ? fundingVaults[0] : fundedVaults[0];
} else {
- console.log("closedVaults", closedVaults[0]);
return currentStep === 1 ? closingVaults[0] : closedVaults[0];
}
}
@@ -86,7 +84,9 @@ export function TransactionSummary({
assetAmount={currentVault?.collateral}
/>
>
- ) : null}
+ ) : (
+ false
+ )}