From a56dbeee711c8c1006a1865054fae36d7af89428 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Tue, 28 Mar 2023 13:48:14 +0100 Subject: [PATCH 01/11] First pass at handling the xdr value overhaul --- convert.ts | 59 +++++++++++++++++++++++++----------------------------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/convert.ts b/convert.ts index 49d97dd9..b9304187 100644 --- a/convert.ts +++ b/convert.ts @@ -7,42 +7,37 @@ export function scvalToBigNumber(scval: SorobanClient.xdr.ScVal | undefined): Bi case undefined: { return BigNumber(0); } - case xdr.ScValType.scvU63(): { - const {high, low} = scval.u63(); - return bigNumberFromBytes(false, high, low); - } case xdr.ScValType.scvU32(): { return BigNumber(scval.u32()); } case xdr.ScValType.scvI32(): { return BigNumber(scval.i32()); } - case xdr.ScValType.scvObject(): { - let obj = scval.obj()!; - switch (obj.switch()) { - case xdr.ScObjectType.scoU64(): { - const {high, low} = obj.u64(); - return bigNumberFromBytes(false, high, low); - } - case xdr.ScObjectType.scoI64(): { - const {high, low} = obj.i64(); - return bigNumberFromBytes(true, high, low); - } - case xdr.ScObjectType.scoU128(): { - const parts = obj.u128(); - const a = parts.hi(); - const b = parts.lo(); - return bigNumberFromBytes(false, a.high, a.low, b.high, b.low); - } - case xdr.ScObjectType.scoI128(): { - const parts = obj.i128(); - const a = parts.hi(); - const b = parts.lo(); - return bigNumberFromBytes(true, a.high, a.low, b.high, b.low); - } - default: - throw new Error(`Invalid type for scvalToBigNumber: ${obj.switch().name}`); - } + case xdr.ScValType.scvU64(): { + const {high, low} = scval.u64(); + return bigNumberFromBytes(false, high, low); + } + case xdr.ScValType.scvI64(): { + const {high, low} = scval.i64(); + return bigNumberFromBytes(true, high, low); + } + case xdr.ScValType.scvU128(): { + const parts = scval.u128(); + const a = parts.hi(); + const b = parts.lo(); + return bigNumberFromBytes(false, a.high, a.low, b.high, b.low); + } + case xdr.ScValType.scoI128(): { + const parts = scval.i128(); + const a = parts.hi(); + const b = parts.lo(); + return bigNumberFromBytes(true, a.high, a.low, b.high, b.low); + } + case xdr.ScValType.scvU256(): { + return bigNumberFromBytes(false, ...[...scval.u256()]); + } + case xdr.ScValType.scoI256(): { + return bigNumberFromBytes(true, ...[...scval.i256()]); } default: { throw new Error(`Invalid type for scvalToBigNumber: ${scval?.switch().name}`); @@ -96,7 +91,7 @@ export function bigNumberToI128(value: BigNumber): SorobanClient.xdr.ScVal { bigNumberFromBytes(false, ...padded.slice(8, 12)).toNumber() ); - return xdr.ScVal.scvObject(xdr.ScObject.scoI128(new xdr.Int128Parts({lo, hi}))); + return xdr.ScVal.scvI128(new xdr.Int128Parts({lo, hi})); } function bigintToBuf(bn: bigint): Buffer { @@ -131,6 +126,6 @@ export function xdrUint64ToNumber(value: SorobanClient.xdr.Uint64): number { } export function scvalToString(value: SorobanClient.xdr.ScVal): string | undefined { - return value.obj()?.bin().toString(); + return value.bytes().bin().toString(); } From 1118621cf58cf1c2913dba162c655d3f97cfc15d Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Tue, 28 Mar 2023 16:54:04 +0100 Subject: [PATCH 02/11] update rust deps and token spec for the contract --- Cargo.lock | 47 ++++++++++++++---------- Cargo.toml | 18 ++++----- contracts/token/soroban_token_spec.wasm | Bin 5782 -> 5730 bytes 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0f6415b4..b7905570 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -324,6 +324,12 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +[[package]] +name = "ethnum" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0198b9d0078e0f30dedc7acbb21c974e838fc8fae3ee170128658a98cb2c1c04" + [[package]] name = "fnv" version = "1.0.7" @@ -802,11 +808,12 @@ dependencies = [ [[package]] name = "soroban-env-common" -version = "0.0.14" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28be0b49003d163d32164528aa37e6c45f0af24e2dfc27a1beb2832e0893d56b" +checksum = "6d29fbe906feaf8aea5f4d7d42213523d167b7dca9d7fff6d41d32b7614fce9b" dependencies = [ "crate-git-revision", + "ethnum", "serde", "soroban-env-macros", "soroban-wasmi", @@ -816,9 +823,9 @@ dependencies = [ [[package]] name = "soroban-env-guest" -version = "0.0.14" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3656b9f9ed6bf1926f3fadf9f289c53e3625627ff8294befb9f9ee62b998970" +checksum = "2fefd6b8af45c2a06cbbe8a26abe99265853e25d2eefe44e6a89da773e04298e" dependencies = [ "soroban-env-common", "static_assertions", @@ -826,9 +833,9 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "0.0.14" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c687a3a9a772816ed604ef2551e8377071cec343729ffe0b43dae13ae1280fdf" +checksum = "e95f23c4d51ae35b6b76e6e7bade504610dbcb8e992c4b8a8ecd7e767dc67a8f" dependencies = [ "backtrace", "curve25519-dalek", @@ -849,9 +856,9 @@ dependencies = [ [[package]] name = "soroban-env-macros" -version = "0.0.14" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f8a0b12e9345e0527c2fa82a32869080b02b3d320f25693fb7a040956bac67" +checksum = "6671aba5e9a697d26fb2b06351c7fa169621e05f1a60eb786fdd7233bd4ee5e0" dependencies = [ "itertools", "proc-macro2", @@ -865,9 +872,9 @@ dependencies = [ [[package]] name = "soroban-ledger-snapshot" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb84883d0beae1ed63812d51ad15a9b2d0a88e884f72ee8f519645ce507e3de4" +checksum = "2f5301e13544c0f5b51cc44f56e85066130523b2bf67fdc17e939663aa52d410" dependencies = [ "serde", "serde_json", @@ -877,9 +884,9 @@ dependencies = [ [[package]] name = "soroban-native-sdk-macros" -version = "0.0.14" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6ec8239376e09d710f4dd79448dc07b27111a49e264386c5d12cbdc43951cb" +checksum = "2b5f2b2b62c86d365db6f1b712f27fb78521c37421d5f936b088eb55af862cf5" dependencies = [ "itertools", "proc-macro2", @@ -889,9 +896,9 @@ dependencies = [ [[package]] name = "soroban-sdk" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558c79da34d4b93a699cd98898047f249737f791410e1b040159fda992f93162" +checksum = "c2ebf70a33a492a07e42e80d8cef4319e2a11ddc74714a2f89b5cadbb3b26ce3" dependencies = [ "bytes-lit", "ed25519-dalek", @@ -905,9 +912,9 @@ dependencies = [ [[package]] name = "soroban-sdk-macros" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832a69c78fff228a369c230054a9c57e9fb24cc9d184124cab9803ff1b67f9c6" +checksum = "bf80f167c13e45c1fa6c367e58ea480e4810a31ac50eeb271554c8a2acee8e9e" dependencies = [ "darling", "itertools", @@ -922,9 +929,9 @@ dependencies = [ [[package]] name = "soroban-spec" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8861bfce88ccfc4694f2ad6774f4ff929f8cc61d8b2ed5c5f4e9fa98a375aa60" +checksum = "ac8da7a37b2534fe52602e824d99387ccb6af968152d8961149f12267a39adf4" dependencies = [ "base64", "darling", @@ -990,9 +997,9 @@ dependencies = [ [[package]] name = "stellar-xdr" -version = "0.0.14" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940dc58ca70e647b0b2517461beb3476fbffa5dc78d10f5c53645da8503c765c" +checksum = "586e1cd433a1769db6acf8418018ec72f7404f3542ee8cf7d9ddc9f6595f58fa" dependencies = [ "base64", "crate-git-revision", diff --git a/Cargo.toml b/Cargo.toml index ad9562c7..00b43afc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,28 +16,28 @@ codegen-units = 1 lto = true [workspace.dependencies.soroban-env-common] -version = "0.0.14" +version = "0.0.15" [workspace.dependencies.soroban-env-guest] -version = "0.0.14" +version = "0.0.15" [workspace.dependencies.soroban-env-macros] -version = "0.0.14" +version = "0.0.15" [workspace.dependencies.soroban-env-host] -version = "0.0.14" +version = "0.0.15" [workspace.dependencies.soroban-native-sdk-macros] -version = "0.0.14" +version = "0.0.15" [workspace.dependencies.soroban-spec] -version = "0.6.0" +version = "0.7.0" [workspace.dependencies.soroban-sdk] -version = "0.6.0" +version = "0.7.0" [workspace.dependencies.soroban-sdk-macros] -version = "0.6.0" +version = "0.7.0" [workspace.dependencies.stellar-xdr] -version = "0.0.14" +version = "0.0.15" diff --git a/contracts/token/soroban_token_spec.wasm b/contracts/token/soroban_token_spec.wasm index 12328bd6c1160dbe968caa48106d6882f2e66889..3e62eefc775223aa0e6a75e9528b1720847ac2e6 100755 GIT binary patch delta 1154 zcmb7BO=uHQ5PtLC?q-`!;x>O3YMPhU)|S{r8Z`bOHjC{+K~%h0f*8{ln%bsKYY_@b zp@*WN5FYg6NqUG@4HUtPAYQzC^z6}th&Mr7=WX2DXe{_(XTO>GX6Acu)(1ZxHArq@ z1_&WA7pxkSowQORH=zP$>ZLFRr!X-EIYL-6QLXmr?Rc~U{=n8-A5;dD?(IW~$3UUN z$~`N1NXDG*W`}J^hv_h<1B`SlwagC8chk%}GU_EVnlTVq5K}$W;EXHgb6Lz;MlWDN zOtDBzG}G~?rWxTVp}-Z17$RGW=%Z<S|cT)a!fvBH}JBiMdPKY>Vn^E?K?h zx`>P)E;%WpN6?C2;CwCx99 ze&m;Mg`j#$3=UAnm$%o<8e3r24y;=5$<-IQ1jBbR3pCQHQ`(VTR#BvP zs0D>8gb#GmwN+b+2o5cXgWxU>;^5#UxVQ-}_5Cinw9#7d8{WU~dH>(9haMf4QMOXT z2q8QhtIFd7wy|BE-b4EJ>Oyw_x4{dCBGH#?t@uJ;f6H>aeh$+)GDLj%9njQ*dP1MZ9Jd&x#utcFd$Az z9UV)&I!#EDqyj7xF9P|7IQ@i*>JqyvJ&;y82Fa6bK}mtznZW&R0-G(PfjV#=vkxt) z6K-f26-|;j1g9AZ8qOT!q#r`NiQ!LzKf(toj<}L=&#-S9CX23GxP-M>N2a z3b)QH$DzKrN;}Xm$`n|JTgQN|x-=3Rv+ETK2>KyN?!(yDh`Lf+5v+! zV*@I4@W=}6OfC~_lesQHJ1C<~cGCT>xOotQdl0-2%C{V^Hw`RaR2LoRG|UDr4?(j88l_0V1_AdP(w*`i)4kLj;0HIMN= z_OWfSU4icS^H-(|X1-A7GPm(d_p!ckZ_mFF9O=uJtXXr0i-5iz*8cTn# zqMQAbiF{L?f$Z$e6{|dPv*4PMpM_(+jkr74mW$~PgBlmmc0+)zRHbK&YEgixS#wRIz9cb From 390581503d974c174bac0637c095d3a7180d4e92 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Tue, 28 Mar 2023 16:55:41 +0100 Subject: [PATCH 03/11] Update soroban-cli usage in ./initialize.sh --- initialize.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/initialize.sh b/initialize.sh index 0ea2b50d..87f4b810 100755 --- a/initialize.sh +++ b/initialize.sh @@ -58,7 +58,7 @@ echo "$TOKEN_ADMIN_ADDRESS" > .soroban/token_admin_address echo Fund token-admin account from friendbot curl --silent -X POST "$FRIENDBOT_URL?addr=$TOKEN_ADMIN_ADDRESS" >/dev/null -ARGS="--network $NETWORK --identity token-admin" +ARGS="--network $NETWORK --source token-admin" echo Wrap the Stellar asset mkdir -p .soroban @@ -85,7 +85,8 @@ soroban contract invoke \ $ARGS \ --wasm target/wasm32-unknown-unknown/release/soroban_crowdfund_contract.wasm \ --id "$CROWDFUND_ID" \ - --fn initialize -- \ + -- \ + initialize \ --recipient "$TOKEN_ADMIN_ADDRESS" \ --deadline "$deadline" \ --target_amount "1000000000" \ From e62c0ba73c7792cd009bc4c69e1982dc4d89fc61 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Wed, 29 Mar 2023 14:39:37 +0100 Subject: [PATCH 04/11] Remove unneeded brackets --- convert.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/convert.ts b/convert.ts index b9304187..5f2f1236 100644 --- a/convert.ts +++ b/convert.ts @@ -34,10 +34,10 @@ export function scvalToBigNumber(scval: SorobanClient.xdr.ScVal | undefined): Bi return bigNumberFromBytes(true, a.high, a.low, b.high, b.low); } case xdr.ScValType.scvU256(): { - return bigNumberFromBytes(false, ...[...scval.u256()]); + return bigNumberFromBytes(false, ...scval.u256()); } case xdr.ScValType.scoI256(): { - return bigNumberFromBytes(true, ...[...scval.i256()]); + return bigNumberFromBytes(true, ...scval.i256()); } default: { throw new Error(`Invalid type for scvalToBigNumber: ${scval?.switch().name}`); From 0fc3ef8322942c0ef3af6178ff129eeaa600faee Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Mon, 3 Apr 2023 13:18:32 +0100 Subject: [PATCH 05/11] Fix type in convert.ts --- convert.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/convert.ts b/convert.ts index 5f2f1236..742ca78f 100644 --- a/convert.ts +++ b/convert.ts @@ -27,7 +27,7 @@ export function scvalToBigNumber(scval: SorobanClient.xdr.ScVal | undefined): Bi const b = parts.lo(); return bigNumberFromBytes(false, a.high, a.low, b.high, b.low); } - case xdr.ScValType.scoI128(): { + case xdr.ScValType.scvI128(): { const parts = scval.i128(); const a = parts.hi(); const b = parts.lo(); @@ -36,7 +36,7 @@ export function scvalToBigNumber(scval: SorobanClient.xdr.ScVal | undefined): Bi case xdr.ScValType.scvU256(): { return bigNumberFromBytes(false, ...scval.u256()); } - case xdr.ScValType.scoI256(): { + case xdr.ScValType.scvI256(): { return bigNumberFromBytes(true, ...scval.i256()); } default: { @@ -126,6 +126,6 @@ export function xdrUint64ToNumber(value: SorobanClient.xdr.Uint64): number { } export function scvalToString(value: SorobanClient.xdr.ScVal): string | undefined { - return value.bytes().bin().toString(); + return value.bytes().toString(); } From 728557a358585e0813c0f9598ddc6fc3b6100a27 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Mon, 3 Apr 2023 13:18:45 +0100 Subject: [PATCH 06/11] Update soroban-client to 0.5.0 --- package-lock.json | 310 ++++++++++++++++++++++++++++++++++++++-------- package.json | 2 +- 2 files changed, 262 insertions(+), 50 deletions(-) diff --git a/package-lock.json b/package-lock.json index eb540c01..03605f0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "next": "12.1.5", "react": "18.1.0", "react-dom": "18.1.0", - "soroban-client": "^0.4.0" + "soroban-client": "^0.5.0" }, "devDependencies": { "@types/humanize-duration": "^3.27.1", @@ -560,6 +560,60 @@ "react": ">=16.8" } }, + "node_modules/@soroban-react/contracts/node_modules/@types/node": { + "version": "18.11.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", + "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" + }, + "node_modules/@soroban-react/contracts/node_modules/axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "dependencies": { + "follow-redirects": "^1.14.7" + } + }, + "node_modules/@soroban-react/contracts/node_modules/bignumber.js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", + "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==", + "engines": { + "node": "*" + } + }, + "node_modules/@soroban-react/contracts/node_modules/soroban-client": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", + "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", + "dependencies": { + "@types/eventsource": "^1.1.2", + "@types/node": "18.11.9", + "@types/randombytes": "^2.0.0", + "@types/urijs": "^1.19.6", + "axios": "0.25.0", + "es6-promise": "^4.2.4", + "lodash": "4.17.21", + "stellar-base": "8.2.2-soroban.11", + "urijs": "^1.19.1" + } + }, + "node_modules/@soroban-react/contracts/node_modules/stellar-base": { + "version": "8.2.2-soroban.11", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", + "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", + "dependencies": { + "base32.js": "^0.1.0", + "bignumber.js": "^4.0.0", + "crc": "^3.5.0", + "js-xdr": "^1.1.3", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "tweetnacl": "^1.0.3" + }, + "optionalDependencies": { + "sodium-native": "^3.3.0" + } + }, "node_modules/@soroban-react/core": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/@soroban-react/core/-/core-3.7.1.tgz", @@ -573,6 +627,60 @@ "react": ">=16.8" } }, + "node_modules/@soroban-react/core/node_modules/@types/node": { + "version": "18.11.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", + "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" + }, + "node_modules/@soroban-react/core/node_modules/axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "dependencies": { + "follow-redirects": "^1.14.7" + } + }, + "node_modules/@soroban-react/core/node_modules/bignumber.js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", + "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==", + "engines": { + "node": "*" + } + }, + "node_modules/@soroban-react/core/node_modules/soroban-client": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", + "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", + "dependencies": { + "@types/eventsource": "^1.1.2", + "@types/node": "18.11.9", + "@types/randombytes": "^2.0.0", + "@types/urijs": "^1.19.6", + "axios": "0.25.0", + "es6-promise": "^4.2.4", + "lodash": "4.17.21", + "stellar-base": "8.2.2-soroban.11", + "urijs": "^1.19.1" + } + }, + "node_modules/@soroban-react/core/node_modules/stellar-base": { + "version": "8.2.2-soroban.11", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", + "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", + "dependencies": { + "base32.js": "^0.1.0", + "bignumber.js": "^4.0.0", + "crc": "^3.5.0", + "js-xdr": "^1.1.3", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "tweetnacl": "^1.0.3" + }, + "optionalDependencies": { + "sodium-native": "^3.3.0" + } + }, "node_modules/@soroban-react/freighter": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/@soroban-react/freighter/-/freighter-3.2.1.tgz", @@ -2715,9 +2823,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", - "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", + "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", "optional": true, "bin": { "node-gyp-build": "bin.js", @@ -3312,9 +3420,9 @@ } }, "node_modules/soroban-client": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.0.tgz", - "integrity": "sha512-4t+SioFeUnG9dptkEzRzSgFKXTuRMz1abtxmzE461QVUCLIDayMIjY8B3vloKiWNSx9y/wNBIA5IA8PtAIm8rQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.5.0.tgz", + "integrity": "sha512-t4P+G7YTyNcO0Wgp1ROSmcXU8Nb+/ShE+2x2BvzJNLsKTZyF/7jVFH/PKkzsrJztgHZ7gnkzh6IUCNQ5wcKYXQ==", "dependencies": { "@types/eventsource": "^1.1.2", "@types/node": "18.11.9", @@ -3323,7 +3431,7 @@ "axios": "0.25.0", "es6-promise": "^4.2.4", "lodash": "4.17.21", - "stellar-base": "8.2.2-soroban.11", + "stellar-base": "8.2.2-soroban.12", "urijs": "^1.19.1" } }, @@ -3340,18 +3448,18 @@ "follow-redirects": "^1.14.7" } }, - "node_modules/soroban-client/node_modules/bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==", + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/soroban-client/node_modules/stellar-base": { - "version": "8.2.2-soroban.11", - "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", - "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", + "node_modules/stellar-base": { + "version": "8.2.2-soroban.12", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.12.tgz", + "integrity": "sha512-bQQxRFA2GXoNsr2ZFN+eK9Du1hSu0+t983tHRMI3nyWlLgZInKg7B9ZFa4UjLbLYpxQ4mE1EYupk3bulqNA91A==", "dependencies": { "base32.js": "^0.1.0", "bignumber.js": "^4.0.0", @@ -3365,12 +3473,12 @@ "sodium-native": "^3.3.0" } }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "node_modules/stellar-base/node_modules/bignumber.js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", + "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==", "engines": { - "node": ">=0.10.0" + "node": "*" } }, "node_modules/string.prototype.matchall": { @@ -4059,6 +4167,57 @@ "requires": { "@soroban-react/core": "^3.7.1", "soroban-client": "^0.4.0" + }, + "dependencies": { + "@types/node": { + "version": "18.11.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", + "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" + }, + "axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "requires": { + "follow-redirects": "^1.14.7" + } + }, + "bignumber.js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", + "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" + }, + "soroban-client": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", + "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", + "requires": { + "@types/eventsource": "^1.1.2", + "@types/node": "18.11.9", + "@types/randombytes": "^2.0.0", + "@types/urijs": "^1.19.6", + "axios": "0.25.0", + "es6-promise": "^4.2.4", + "lodash": "4.17.21", + "stellar-base": "8.2.2-soroban.11", + "urijs": "^1.19.1" + } + }, + "stellar-base": { + "version": "8.2.2-soroban.11", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", + "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", + "requires": { + "base32.js": "^0.1.0", + "bignumber.js": "^4.0.0", + "crc": "^3.5.0", + "js-xdr": "^1.1.3", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "sodium-native": "^3.3.0", + "tweetnacl": "^1.0.3" + } + } } }, "@soroban-react/core": { @@ -4069,6 +4228,57 @@ "@soroban-react/freighter": "^3.2.1", "@soroban-react/types": "^3.2.1", "soroban-client": "^0.4.0" + }, + "dependencies": { + "@types/node": { + "version": "18.11.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", + "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" + }, + "axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "requires": { + "follow-redirects": "^1.14.7" + } + }, + "bignumber.js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", + "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" + }, + "soroban-client": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", + "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", + "requires": { + "@types/eventsource": "^1.1.2", + "@types/node": "18.11.9", + "@types/randombytes": "^2.0.0", + "@types/urijs": "^1.19.6", + "axios": "0.25.0", + "es6-promise": "^4.2.4", + "lodash": "4.17.21", + "stellar-base": "8.2.2-soroban.11", + "urijs": "^1.19.1" + } + }, + "stellar-base": { + "version": "8.2.2-soroban.11", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", + "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", + "requires": { + "base32.js": "^0.1.0", + "bignumber.js": "^4.0.0", + "crc": "^3.5.0", + "js-xdr": "^1.1.3", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "sodium-native": "^3.3.0", + "tweetnacl": "^1.0.3" + } + } } }, "@soroban-react/freighter": { @@ -5624,9 +5834,9 @@ } }, "node-gyp-build": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", - "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", + "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", "optional": true }, "object-assign": { @@ -6009,9 +6219,9 @@ } }, "soroban-client": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.0.tgz", - "integrity": "sha512-4t+SioFeUnG9dptkEzRzSgFKXTuRMz1abtxmzE461QVUCLIDayMIjY8B3vloKiWNSx9y/wNBIA5IA8PtAIm8rQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.5.0.tgz", + "integrity": "sha512-t4P+G7YTyNcO0Wgp1ROSmcXU8Nb+/ShE+2x2BvzJNLsKTZyF/7jVFH/PKkzsrJztgHZ7gnkzh6IUCNQ5wcKYXQ==", "requires": { "@types/eventsource": "^1.1.2", "@types/node": "18.11.9", @@ -6020,7 +6230,7 @@ "axios": "0.25.0", "es6-promise": "^4.2.4", "lodash": "4.17.21", - "stellar-base": "8.2.2-soroban.11", + "stellar-base": "8.2.2-soroban.12", "urijs": "^1.19.1" }, "dependencies": { @@ -6036,26 +6246,6 @@ "requires": { "follow-redirects": "^1.14.7" } - }, - "bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" - }, - "stellar-base": { - "version": "8.2.2-soroban.11", - "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", - "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", - "requires": { - "base32.js": "^0.1.0", - "bignumber.js": "^4.0.0", - "crc": "^3.5.0", - "js-xdr": "^1.1.3", - "lodash": "^4.17.21", - "sha.js": "^2.3.6", - "sodium-native": "^3.3.0", - "tweetnacl": "^1.0.3" - } } } }, @@ -6064,6 +6254,28 @@ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" }, + "stellar-base": { + "version": "8.2.2-soroban.12", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.12.tgz", + "integrity": "sha512-bQQxRFA2GXoNsr2ZFN+eK9Du1hSu0+t983tHRMI3nyWlLgZInKg7B9ZFa4UjLbLYpxQ4mE1EYupk3bulqNA91A==", + "requires": { + "base32.js": "^0.1.0", + "bignumber.js": "^4.0.0", + "crc": "^3.5.0", + "js-xdr": "^1.1.3", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "sodium-native": "^3.3.0", + "tweetnacl": "^1.0.3" + }, + "dependencies": { + "bignumber.js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", + "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" + } + } + }, "string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", diff --git a/package.json b/package.json index 090ae267..4859f5a0 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "next": "12.1.5", "react": "18.1.0", "react-dom": "18.1.0", - "soroban-client": "^0.4.0" + "soroban-client": "^0.5.0" }, "devDependencies": { "@types/humanize-duration": "^3.27.1", From 93674b12e0ea0aab94d5350a0a652ed06ab9465e Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Mon, 3 Apr 2023 14:17:36 +0100 Subject: [PATCH 07/11] Remove unused import --- components/molecules/deposits/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/components/molecules/deposits/index.tsx b/components/molecules/deposits/index.tsx index 19bf3315..c50bbdd0 100644 --- a/components/molecules/deposits/index.tsx +++ b/components/molecules/deposits/index.tsx @@ -2,7 +2,6 @@ import React from 'react' import * as SorobanClient from 'soroban-client' import styles from './style.module.css' import { Utils } from '../../../shared/utils' -import BigNumber from 'bignumber.js' import { Spacer } from '../../atoms/spacer' import * as convert from '../../../convert' import { Constants } from '../../../shared/constants' From 35d29640ccffaa0dcba6d5512b76b29505466cbd Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Mon, 3 Apr 2023 14:18:00 +0100 Subject: [PATCH 08/11] Update package-lock.json --- package-lock.json | 105 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/package-lock.json b/package-lock.json index f01f0603..60858d78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -558,6 +558,60 @@ "soroban-client": "^0.4.0" } }, + "node_modules/@soroban-react/chains/node_modules/@types/node": { + "version": "18.11.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", + "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" + }, + "node_modules/@soroban-react/chains/node_modules/axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "dependencies": { + "follow-redirects": "^1.14.7" + } + }, + "node_modules/@soroban-react/chains/node_modules/bignumber.js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", + "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==", + "engines": { + "node": "*" + } + }, + "node_modules/@soroban-react/chains/node_modules/soroban-client": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", + "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", + "dependencies": { + "@types/eventsource": "^1.1.2", + "@types/node": "18.11.9", + "@types/randombytes": "^2.0.0", + "@types/urijs": "^1.19.6", + "axios": "0.25.0", + "es6-promise": "^4.2.4", + "lodash": "4.17.21", + "stellar-base": "8.2.2-soroban.11", + "urijs": "^1.19.1" + } + }, + "node_modules/@soroban-react/chains/node_modules/stellar-base": { + "version": "8.2.2-soroban.11", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", + "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", + "dependencies": { + "base32.js": "^0.1.0", + "bignumber.js": "^4.0.0", + "crc": "^3.5.0", + "js-xdr": "^1.1.3", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "tweetnacl": "^1.0.3" + }, + "optionalDependencies": { + "sodium-native": "^3.3.0" + } + }, "node_modules/@soroban-react/contracts": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@soroban-react/contracts/-/contracts-4.0.0.tgz", @@ -4177,6 +4231,57 @@ "requires": { "@soroban-react/types": "^4.0.0", "soroban-client": "^0.4.0" + }, + "dependencies": { + "@types/node": { + "version": "18.11.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", + "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" + }, + "axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "requires": { + "follow-redirects": "^1.14.7" + } + }, + "bignumber.js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", + "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" + }, + "soroban-client": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", + "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", + "requires": { + "@types/eventsource": "^1.1.2", + "@types/node": "18.11.9", + "@types/randombytes": "^2.0.0", + "@types/urijs": "^1.19.6", + "axios": "0.25.0", + "es6-promise": "^4.2.4", + "lodash": "4.17.21", + "stellar-base": "8.2.2-soroban.11", + "urijs": "^1.19.1" + } + }, + "stellar-base": { + "version": "8.2.2-soroban.11", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", + "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", + "requires": { + "base32.js": "^0.1.0", + "bignumber.js": "^4.0.0", + "crc": "^3.5.0", + "js-xdr": "^1.1.3", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "sodium-native": "^3.3.0", + "tweetnacl": "^1.0.3" + } + } } }, "@soroban-react/contracts": { From 98dae1432f800e60ceecd4555f096f836a707b9c Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Mon, 3 Apr 2023 14:37:21 +0100 Subject: [PATCH 09/11] Update soroban-react dep --- package-lock.json | 373 ++++------------------------------------------ package.json | 6 +- 2 files changed, 32 insertions(+), 347 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60858d78..b1a1f827 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "0.1.0", "dependencies": { "@radix-ui/react-dialog": "1.0.2", - "@soroban-react/chains": "4.0.0", - "@soroban-react/contracts": "4.0.0", - "@soroban-react/core": "4.0.0", + "@soroban-react/chains": "4.1.0", + "@soroban-react/contracts": "4.1.0", + "@soroban-react/core": "4.1.0", "@soroban-react/freighter": "4.0.0", "@soroban-react/types": "4.0.0", "@stellar/freighter-api": "^1.3.1", @@ -550,201 +550,39 @@ "dev": true }, "node_modules/@soroban-react/chains": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@soroban-react/chains/-/chains-4.0.0.tgz", - "integrity": "sha512-JxQ18KadbR8qHMhSGdFfgLmLnq4uVyAYGosAAF5sRAP5R873BlFLWPrBYz1vrT2zkd947P3U1UCrQRvckr3CuA==", - "dependencies": { - "@soroban-react/types": "^4.0.0", - "soroban-client": "^0.4.0" - } - }, - "node_modules/@soroban-react/chains/node_modules/@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" - }, - "node_modules/@soroban-react/chains/node_modules/axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", - "dependencies": { - "follow-redirects": "^1.14.7" - } - }, - "node_modules/@soroban-react/chains/node_modules/bignumber.js": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==", - "engines": { - "node": "*" - } - }, - "node_modules/@soroban-react/chains/node_modules/soroban-client": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", - "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", + "resolved": "https://registry.npmjs.org/@soroban-react/chains/-/chains-4.1.0.tgz", + "integrity": "sha512-40bASgPfmLPOzUUXaF8ZHYJdMJ5vf9TltralqPJgRC8wlXoSKnOSlU/Nk6iyE1gDyzsURItgnu79YJ6oLTQdOg==", "dependencies": { - "@types/eventsource": "^1.1.2", - "@types/node": "18.11.9", - "@types/randombytes": "^2.0.0", - "@types/urijs": "^1.19.6", - "axios": "0.25.0", - "es6-promise": "^4.2.4", - "lodash": "4.17.21", - "stellar-base": "8.2.2-soroban.11", - "urijs": "^1.19.1" - } - }, - "node_modules/@soroban-react/chains/node_modules/stellar-base": { - "version": "8.2.2-soroban.11", - "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", - "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", - "dependencies": { - "base32.js": "^0.1.0", - "bignumber.js": "^4.0.0", - "crc": "^3.5.0", - "js-xdr": "^1.1.3", - "lodash": "^4.17.21", - "sha.js": "^2.3.6", - "tweetnacl": "^1.0.3" - }, - "optionalDependencies": { - "sodium-native": "^3.3.0" + "@soroban-react/types": "^4.0.0", + "soroban-client": "^0.5.0" } }, "node_modules/@soroban-react/contracts": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@soroban-react/contracts/-/contracts-4.0.0.tgz", - "integrity": "sha512-uGlIzDb2lgQkcCYnfQiAPGJmPahwKspMSbgoU1Bi9U0gfeZDTfHmJPQGDiT0N4tkTWKFR/1UV92Z6EntsF/bQA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@soroban-react/contracts/-/contracts-4.1.0.tgz", + "integrity": "sha512-vnhmZbSXPmAtXg2XUmhR46oFYOBMnuyeJgxssfyKAl3Ud3nEwu/3KbSmfMqlIOZh3YZn+T8rB4BXZCeMB9P3dQ==", "dependencies": { - "@soroban-react/core": "^4.0.0", - "soroban-client": "^0.4.0" + "@soroban-react/core": "^4.1.0", + "soroban-client": "^0.5.0" }, "peerDependencies": { "react": ">=16.8" } }, - "node_modules/@soroban-react/contracts/node_modules/@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" - }, - "node_modules/@soroban-react/contracts/node_modules/axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", - "dependencies": { - "follow-redirects": "^1.14.7" - } - }, - "node_modules/@soroban-react/contracts/node_modules/bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==", - "engines": { - "node": "*" - } - }, - "node_modules/@soroban-react/contracts/node_modules/soroban-client": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", - "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", - "dependencies": { - "@types/eventsource": "^1.1.2", - "@types/node": "18.11.9", - "@types/randombytes": "^2.0.0", - "@types/urijs": "^1.19.6", - "axios": "0.25.0", - "es6-promise": "^4.2.4", - "lodash": "4.17.21", - "stellar-base": "8.2.2-soroban.11", - "urijs": "^1.19.1" - } - }, - "node_modules/@soroban-react/contracts/node_modules/stellar-base": { - "version": "8.2.2-soroban.11", - "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", - "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", - "dependencies": { - "base32.js": "^0.1.0", - "bignumber.js": "^4.0.0", - "crc": "^3.5.0", - "js-xdr": "^1.1.3", - "lodash": "^4.17.21", - "sha.js": "^2.3.6", - "tweetnacl": "^1.0.3" - }, - "optionalDependencies": { - "sodium-native": "^3.3.0" - } - }, "node_modules/@soroban-react/core": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@soroban-react/core/-/core-4.0.0.tgz", - "integrity": "sha512-QsK+9aNxHTGkgAERZ1Jyi9n4J7G6tJpe+KxN5DmfEcdUN+b/pOg95JwFDq9ZpkfIEWaeWpRixFEhIw4oxnaVSw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@soroban-react/core/-/core-4.1.0.tgz", + "integrity": "sha512-4Bnb8lfMxbnEWVHANU/Sp1x79RJBAYQ5eyLUCI6E0y5hI7ug0RYteawt2wvacHXB89jSLeXnUeil++6FR/lW2w==", "dependencies": { "@soroban-react/freighter": "^4.0.0", "@soroban-react/types": "^4.0.0", - "soroban-client": "^0.4.0" + "soroban-client": "^0.5.0" }, "peerDependencies": { "react": ">=16.8" } }, - "node_modules/@soroban-react/core/node_modules/@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" - }, - "node_modules/@soroban-react/core/node_modules/axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", - "dependencies": { - "follow-redirects": "^1.14.7" - } - }, - "node_modules/@soroban-react/core/node_modules/bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==", - "engines": { - "node": "*" - } - }, - "node_modules/@soroban-react/core/node_modules/soroban-client": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", - "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", - "dependencies": { - "@types/eventsource": "^1.1.2", - "@types/node": "18.11.9", - "@types/randombytes": "^2.0.0", - "@types/urijs": "^1.19.6", - "axios": "0.25.0", - "es6-promise": "^4.2.4", - "lodash": "4.17.21", - "stellar-base": "8.2.2-soroban.11", - "urijs": "^1.19.1" - } - }, - "node_modules/@soroban-react/core/node_modules/stellar-base": { - "version": "8.2.2-soroban.11", - "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", - "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", - "dependencies": { - "base32.js": "^0.1.0", - "bignumber.js": "^4.0.0", - "crc": "^3.5.0", - "js-xdr": "^1.1.3", - "lodash": "^4.17.21", - "sha.js": "^2.3.6", - "tweetnacl": "^1.0.3" - }, - "optionalDependencies": { - "sodium-native": "^3.3.0" - } - }, "node_modules/@soroban-react/freighter": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@soroban-react/freighter/-/freighter-4.0.0.tgz", @@ -4225,184 +4063,31 @@ "dev": true }, "@soroban-react/chains": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@soroban-react/chains/-/chains-4.0.0.tgz", - "integrity": "sha512-JxQ18KadbR8qHMhSGdFfgLmLnq4uVyAYGosAAF5sRAP5R873BlFLWPrBYz1vrT2zkd947P3U1UCrQRvckr3CuA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@soroban-react/chains/-/chains-4.1.0.tgz", + "integrity": "sha512-40bASgPfmLPOzUUXaF8ZHYJdMJ5vf9TltralqPJgRC8wlXoSKnOSlU/Nk6iyE1gDyzsURItgnu79YJ6oLTQdOg==", "requires": { "@soroban-react/types": "^4.0.0", - "soroban-client": "^0.4.0" - }, - "dependencies": { - "@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" - }, - "axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", - "requires": { - "follow-redirects": "^1.14.7" - } - }, - "bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" - }, - "soroban-client": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", - "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", - "requires": { - "@types/eventsource": "^1.1.2", - "@types/node": "18.11.9", - "@types/randombytes": "^2.0.0", - "@types/urijs": "^1.19.6", - "axios": "0.25.0", - "es6-promise": "^4.2.4", - "lodash": "4.17.21", - "stellar-base": "8.2.2-soroban.11", - "urijs": "^1.19.1" - } - }, - "stellar-base": { - "version": "8.2.2-soroban.11", - "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", - "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", - "requires": { - "base32.js": "^0.1.0", - "bignumber.js": "^4.0.0", - "crc": "^3.5.0", - "js-xdr": "^1.1.3", - "lodash": "^4.17.21", - "sha.js": "^2.3.6", - "sodium-native": "^3.3.0", - "tweetnacl": "^1.0.3" - } - } + "soroban-client": "^0.5.0" } }, "@soroban-react/contracts": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@soroban-react/contracts/-/contracts-4.0.0.tgz", - "integrity": "sha512-uGlIzDb2lgQkcCYnfQiAPGJmPahwKspMSbgoU1Bi9U0gfeZDTfHmJPQGDiT0N4tkTWKFR/1UV92Z6EntsF/bQA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@soroban-react/contracts/-/contracts-4.1.0.tgz", + "integrity": "sha512-vnhmZbSXPmAtXg2XUmhR46oFYOBMnuyeJgxssfyKAl3Ud3nEwu/3KbSmfMqlIOZh3YZn+T8rB4BXZCeMB9P3dQ==", "requires": { - "@soroban-react/core": "^4.0.0", - "soroban-client": "^0.4.0" - }, - "dependencies": { - "@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" - }, - "axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", - "requires": { - "follow-redirects": "^1.14.7" - } - }, - "bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" - }, - "soroban-client": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", - "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", - "requires": { - "@types/eventsource": "^1.1.2", - "@types/node": "18.11.9", - "@types/randombytes": "^2.0.0", - "@types/urijs": "^1.19.6", - "axios": "0.25.0", - "es6-promise": "^4.2.4", - "lodash": "4.17.21", - "stellar-base": "8.2.2-soroban.11", - "urijs": "^1.19.1" - } - }, - "stellar-base": { - "version": "8.2.2-soroban.11", - "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", - "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", - "requires": { - "base32.js": "^0.1.0", - "bignumber.js": "^4.0.0", - "crc": "^3.5.0", - "js-xdr": "^1.1.3", - "lodash": "^4.17.21", - "sha.js": "^2.3.6", - "sodium-native": "^3.3.0", - "tweetnacl": "^1.0.3" - } - } + "@soroban-react/core": "^4.1.0", + "soroban-client": "^0.5.0" } }, "@soroban-react/core": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@soroban-react/core/-/core-4.0.0.tgz", - "integrity": "sha512-QsK+9aNxHTGkgAERZ1Jyi9n4J7G6tJpe+KxN5DmfEcdUN+b/pOg95JwFDq9ZpkfIEWaeWpRixFEhIw4oxnaVSw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@soroban-react/core/-/core-4.1.0.tgz", + "integrity": "sha512-4Bnb8lfMxbnEWVHANU/Sp1x79RJBAYQ5eyLUCI6E0y5hI7ug0RYteawt2wvacHXB89jSLeXnUeil++6FR/lW2w==", "requires": { "@soroban-react/freighter": "^4.0.0", "@soroban-react/types": "^4.0.0", - "soroban-client": "^0.4.0" - }, - "dependencies": { - "@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" - }, - "axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", - "requires": { - "follow-redirects": "^1.14.7" - } - }, - "bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" - }, - "soroban-client": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.4.1.tgz", - "integrity": "sha512-jeS8NkI+AxmFSpsDKlwoUX82jP3E1Isdq9gc2+vwkAba0c4i5mC4Lli2fC99guj7tA3vCeOc5xxmdts5Y1kGcw==", - "requires": { - "@types/eventsource": "^1.1.2", - "@types/node": "18.11.9", - "@types/randombytes": "^2.0.0", - "@types/urijs": "^1.19.6", - "axios": "0.25.0", - "es6-promise": "^4.2.4", - "lodash": "4.17.21", - "stellar-base": "8.2.2-soroban.11", - "urijs": "^1.19.1" - } - }, - "stellar-base": { - "version": "8.2.2-soroban.11", - "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2-soroban.11.tgz", - "integrity": "sha512-pizPJj/4Vg75n4slk3L66pzJS1+bCXsWWG7GgYiuNmzl2bKwY7cS/87PypBEDUx7msOF/ZEocGg9kJ7sU6wupg==", - "requires": { - "base32.js": "^0.1.0", - "bignumber.js": "^4.0.0", - "crc": "^3.5.0", - "js-xdr": "^1.1.3", - "lodash": "^4.17.21", - "sha.js": "^2.3.6", - "sodium-native": "^3.3.0", - "tweetnacl": "^1.0.3" - } - } + "soroban-client": "^0.5.0" } }, "@soroban-react/freighter": { diff --git a/package.json b/package.json index f273d3d1..b0367611 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,11 @@ }, "dependencies": { "@radix-ui/react-dialog": "1.0.2", - "@soroban-react/contracts": "4.0.0", - "@soroban-react/core": "4.0.0", + "@soroban-react/contracts": "4.1.0", + "@soroban-react/core": "4.1.0", "@soroban-react/freighter": "4.0.0", "@soroban-react/types": "4.0.0", - "@soroban-react/chains": "4.0.0", + "@soroban-react/chains": "4.1.0", "@stellar/freighter-api": "^1.3.1", "axios": "^0.27.2", "bignumber.js": "^9.1.0", From f7a505d00d6f6753d30ec3485bf5d7b14f3a67c2 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Mon, 3 Apr 2023 14:42:00 +0100 Subject: [PATCH 10/11] Fix missed scval update --- components/organisms/pledge/index.tsx | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/components/organisms/pledge/index.tsx b/components/organisms/pledge/index.tsx index 9d382fd1..28ca31c3 100644 --- a/components/organisms/pledge/index.tsx +++ b/components/organisms/pledge/index.tsx @@ -59,12 +59,6 @@ const Pledge: FunctionComponent = () => { sorobanContext }) - let started = useContractValue({ - contractId: Constants.CrowdfundId, - method: 'started', - sorobanContext - }) - let targetAmountXdr = useContractValue({ contractId: Constants.CrowdfundId, method: 'target', @@ -84,19 +78,11 @@ const Pledge: FunctionComponent = () => { deadline.result && new Date( convert.xdrUint64ToNumber( - deadline.result.obj()?.u64() ?? xdr.Int64.fromString('0') + deadline.result.u64() ?? xdr.Int64.fromString('0') ) * 1000 ) const targetAmount = convert.scvalToBigNumber(targetAmountXdr.result) - const startedDate = - started.result && - new Date( - convert.xdrUint64ToNumber( - started.result.obj()?.u64() ?? xdr.Int64.fromString('0') - ) * 1000 - ) - const isLoading = (): boolean | undefined => { return ( token.balance.loading || From f1a12411495e6ee6ef109278775eaff0232d2ce4 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Mon, 3 Apr 2023 14:43:13 +0100 Subject: [PATCH 11/11] Update and run eslint --- package-lock.json | 4 ++-- package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index b1a1f827..1098c573 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,8 +29,8 @@ "@types/node": "17.0.30", "@types/react": "18.0.8", "@types/react-dom": "18.0.3", - "eslint": "8.14.0", - "eslint-config-next": "12.1.5", + "eslint": "^8.14.0", + "eslint-config-next": "^12.1.5", "typescript": "4.6.4" }, "engines": { diff --git a/package.json b/package.json index b0367611..90c2df7b 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,11 @@ }, "dependencies": { "@radix-ui/react-dialog": "1.0.2", + "@soroban-react/chains": "4.1.0", "@soroban-react/contracts": "4.1.0", "@soroban-react/core": "4.1.0", "@soroban-react/freighter": "4.0.0", "@soroban-react/types": "4.0.0", - "@soroban-react/chains": "4.1.0", "@stellar/freighter-api": "^1.3.1", "axios": "^0.27.2", "bignumber.js": "^9.1.0", @@ -32,8 +32,8 @@ "@types/node": "17.0.30", "@types/react": "18.0.8", "@types/react-dom": "18.0.3", - "eslint": "8.14.0", - "eslint-config-next": "12.1.5", + "eslint": "^8.14.0", + "eslint-config-next": "^12.1.5", "typescript": "4.6.4" }, "engines": {