From a7dfcb20298bf5fa3313df732264d1e81d29efec Mon Sep 17 00:00:00 2001 From: JC Date: Wed, 14 Aug 2024 19:18:49 -0600 Subject: [PATCH 1/9] fix: history line when confirming fixed --- .../History/components/ValueTransferLine.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/components/History/components/ValueTransferLine.tsx b/components/History/components/ValueTransferLine.tsx index 00a5e854f..88af1880b 100644 --- a/components/History/components/ValueTransferLine.tsx +++ b/components/History/components/ValueTransferLine.tsx @@ -120,7 +120,7 @@ const ValueTransferLine: React.FunctionComponent = ({ /> - {!!vt.address && ( + {!!vt.address && vt.confirmations > 0 && ( {}} openModal={() => {}} /> @@ -128,8 +128,8 @@ const ValueTransferLine: React.FunctionComponent = ({ 0 ? 'row' : 'column', + alignItems: vt.kind === ValueTransferKindEnum.Sent && vt.confirmations > 0 ? 'center' : 'flex-start', }}> = ({ : ''} {vt.confirmations === 0 && ( - + {('[ ' + translate('history.not-confirmed') + ' ]') as string} )} From 4021c7bf7cf6b9fe3bf8cb25cfa68d3697ca0e7d Mon Sep 17 00:00:00 2001 From: JC Date: Tue, 3 Sep 2024 17:57:55 -0600 Subject: [PATCH 2/9] fix: value transfer status: transmitted, mempool & confirmed --- .github/workflows/android-build.yaml | 6 +- .github/workflows/create-cache-key.yaml | 6 +- .github/workflows/ios-build.yaml | 6 +- __mocks__/dataMocks/mockValueTransfers.ts | 6 + app/AppState/types/ValueTransferType.ts | 2 + app/rpc/RPC.ts | 7 +- app/rpc/enums/RPCValueTransfersStatusEnum.ts | 4 +- .../History/components/ValueTransferLine.tsx | 2 +- package.json | 3 +- rust/Cargo.lock | 267 ++++++++---------- rust/Cargo.toml | 3 +- rust/android/Cargo.toml | 4 +- rust/android/tests/e2e_tests.rs | 2 +- rust/lib/Cargo.toml | 1 - rust/lib/src/lib.rs | 8 +- 15 files changed, 160 insertions(+), 167 deletions(-) diff --git a/.github/workflows/android-build.yaml b/.github/workflows/android-build.yaml index 7212c2d8c..b3eb090bd 100644 --- a/.github/workflows/android-build.yaml +++ b/.github/workflows/android-build.yaml @@ -66,10 +66,10 @@ jobs: if: ${{ contains(github.repository, 'zingolib') }} run: | echo "zingolib_ref=$(echo ${GITHUB_REF} | sed 's/\//\\\//g')" >> $GITHUB_ENV - sed -i "/^zingolib\|^zingoconfig/ s/branch = \"dev\"/rev = \"${{ env.zingolib_ref }}\"/" "rust/lib/Cargo.toml" - if cat rust/lib/Cargo.toml | grep "^zingolib\|^zingoconfig" | grep -q "branch"; then exit 1; fi + sed -i "/^zingolib/ s/branch = \"dev\"/rev = \"${{ env.zingolib_ref }}\"/" "rust/lib/Cargo.toml" + if cat rust/lib/Cargo.toml | grep "^zingolib" | grep -q "branch"; then exit 1; fi cd rust - cargo update -p zingolib -p zingoconfig --aggressive + cargo update -p zingolib --aggressive cargo install --version ^3 cargo-ndk rustup default nightly diff --git a/.github/workflows/create-cache-key.yaml b/.github/workflows/create-cache-key.yaml index 3f319ce19..b2c630e42 100644 --- a/.github/workflows/create-cache-key.yaml +++ b/.github/workflows/create-cache-key.yaml @@ -34,9 +34,9 @@ jobs: if: ${{ contains(github.repository, 'zingolib') }} run: | echo "zingolib_ref=$(echo ${GITHUB_REF} | sed 's/\//\\\//g')" >> $GITHUB_ENV - sed -i "/^zingolib\|^zingoconfig/ s/branch = \"dev\"/rev = \"${{ env.zingolib_ref }}\"/" "rust/lib/Cargo.toml" - if cat rust/lib/Cargo.toml | grep "^zingolib\|^zingoconfig" | grep -q "branch"; then exit 1; fi - cd rust && cargo update -p zingolib -p zingoconfig --aggressive + sed -i "/^zingolib/ s/branch = \"dev\"/rev = \"${{ env.zingolib_ref }}\"/" "rust/lib/Cargo.toml" + if cat rust/lib/Cargo.toml | grep "^zingolib" | grep -q "branch"; then exit 1; fi + cd rust && cargo update -p zingolib --aggressive - name: Store Cargo version run: echo $(cargo --version) >> rust/cargo_version.txt diff --git a/.github/workflows/ios-build.yaml b/.github/workflows/ios-build.yaml index 933f3b80f..059b50465 100644 --- a/.github/workflows/ios-build.yaml +++ b/.github/workflows/ios-build.yaml @@ -60,10 +60,10 @@ jobs: if: ${{ contains(github.repository, 'zingolib') }} run: | echo "zingolib_ref=$(echo ${GITHUB_REF} | sed 's/\//\\\//g')" >> $GITHUB_ENV - sudo sed -i "/^zingolib\|^zingoconfig/ s/branch = \"dev\"/rev = \"${{ env.zingolib_ref }}\"/" "rust/lib/Cargo.toml" - if cat rust/lib/Cargo.toml | grep "^zingolib\|^zingoconfig" | grep -q "branch"; then exit 1; fi + sudo sed -i "/^zingolib/ s/branch = \"dev\"/rev = \"${{ env.zingolib_ref }}\"/" "rust/lib/Cargo.toml" + if cat rust/lib/Cargo.toml | grep "^zingolib" | grep -q "branch"; then exit 1; fi cd rust - sudo cargo update -p zingolib -p zingoconfig --aggressive + sudo cargo update -p zingolib --aggressive sudo rustup default nightly - name: Install Cargo Lipo diff --git a/__mocks__/dataMocks/mockValueTransfers.ts b/__mocks__/dataMocks/mockValueTransfers.ts index c97252a35..b8bb61bfb 100644 --- a/__mocks__/dataMocks/mockValueTransfers.ts +++ b/__mocks__/dataMocks/mockValueTransfers.ts @@ -1,10 +1,12 @@ import { PoolEnum, ValueTransferType, ValueTransferKindEnum } from '../../app/AppState'; +import { RPCValueTransfersStatusEnum } from '../../app/rpc/enums/RPCValueTransfersStatusEnum'; export const mockValueTransfers: ValueTransferType[] = [ { kind: ValueTransferKindEnum.Sent, fee: 0.0001, confirmations: 22, + status: RPCValueTransfersStatusEnum.confirmed, txid: 'sent-txid-1234567890', time: Date.now() - 1000, zecPrice: 33.33, @@ -16,6 +18,7 @@ export const mockValueTransfers: ValueTransferType[] = [ kind: ValueTransferKindEnum.MemoToSelf, fee: 0.0001, confirmations: 12, + status: RPCValueTransfersStatusEnum.confirmed, txid: 'memotooself-txid-1234567890', time: Date.now() - 100, zecPrice: 33.33, @@ -27,6 +30,7 @@ export const mockValueTransfers: ValueTransferType[] = [ kind: ValueTransferKindEnum.SendToSelf, fee: 0.0001, confirmations: 12, + status: RPCValueTransfersStatusEnum.confirmed, txid: 'sendtooself-txid-1234567890', time: Date.now() - 100, zecPrice: 33.33, @@ -36,6 +40,7 @@ export const mockValueTransfers: ValueTransferType[] = [ { kind: ValueTransferKindEnum.Received, confirmations: 133, + status: RPCValueTransfersStatusEnum.confirmed, txid: 'receive-txid-1234567890', time: Date.now() - 10, zecPrice: 66.66, @@ -48,6 +53,7 @@ export const mockValueTransfers: ValueTransferType[] = [ kind: ValueTransferKindEnum.Shield, fee: 0.0001, confirmations: 12, + status: RPCValueTransfersStatusEnum.confirmed, txid: 'shield-txid-1234567890', time: Date.now(), zecPrice: 33.33, diff --git a/app/AppState/types/ValueTransferType.ts b/app/AppState/types/ValueTransferType.ts index e9c111dfb..aa7c785d4 100644 --- a/app/AppState/types/ValueTransferType.ts +++ b/app/AppState/types/ValueTransferType.ts @@ -1,5 +1,6 @@ import { ValueTransferKindEnum } from '../enums/ValueTransferKindEnum'; import { PoolEnum } from '../enums/PoolEnum'; +import { RPCValueTransfersStatusEnum } from '../../rpc/enums/RPCValueTransfersStatusEnum'; export default interface ValueTransferType { txid: string; @@ -12,5 +13,6 @@ export default interface ValueTransferType { amount: number; memos?: string[]; poolType?: PoolEnum; + status: RPCValueTransfersStatusEnum; // eslint-disable-next-line semi } diff --git a/app/rpc/RPC.ts b/app/rpc/RPC.ts index 30818d481..0fea8054a 100644 --- a/app/rpc/RPC.ts +++ b/app/rpc/RPC.ts @@ -1294,7 +1294,10 @@ export default class RPC { : undefined; currentValueTransferList.fee = (!vt.transaction_fee ? 0 : vt.transaction_fee) / 10 ** 8; currentValueTransferList.zecPrice = !vt.zec_price ? 0 : vt.zec_price; - if (vt.status === RPCValueTransfersStatusEnum.pending) { + if ( + vt.status === RPCValueTransfersStatusEnum.transmitted || + vt.status === RPCValueTransfersStatusEnum.mempool + ) { currentValueTransferList.confirmations = 0; } else if (vt.status === RPCValueTransfersStatusEnum.confirmed) { currentValueTransferList.confirmations = this.lastServerBlockHeight @@ -1304,7 +1307,7 @@ export default class RPC { // impossible case... I guess. currentValueTransferList.confirmations = 0; } - + currentValueTransferList.status = vt.status; currentValueTransferList.address = !vt.recipient_address ? undefined : vt.recipient_address; currentValueTransferList.amount = (!vt.value ? 0 : vt.value) / 10 ** 8; currentValueTransferList.memos = !vt.memos || vt.memos.length === 0 ? undefined : vt.memos; diff --git a/app/rpc/enums/RPCValueTransfersStatusEnum.ts b/app/rpc/enums/RPCValueTransfersStatusEnum.ts index 719c57d17..75a50c62a 100644 --- a/app/rpc/enums/RPCValueTransfersStatusEnum.ts +++ b/app/rpc/enums/RPCValueTransfersStatusEnum.ts @@ -1,4 +1,6 @@ export enum RPCValueTransfersStatusEnum { - pending = 'pending', + //pending = 'pending', deprecated / splitted + transmitted = 'transmitted', + mempool = 'mempool', confirmed = 'confirmed', } diff --git a/components/History/components/ValueTransferLine.tsx b/components/History/components/ValueTransferLine.tsx index 88af1880b..8df27f8b2 100644 --- a/components/History/components/ValueTransferLine.tsx +++ b/components/History/components/ValueTransferLine.tsx @@ -169,7 +169,7 @@ const ValueTransferLine: React.FunctionComponent = ({ fontWeight: '900', marginLeft: 10, }}> - {('[ ' + translate('history.not-confirmed') + ' ]') as string} + {('[ ' + translate('history.not-confirmed') + ' ] - ' + vt.status) as string} )} diff --git a/package.json b/package.json index f30cf7fe9..6122e250c 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "build:release:split": "cd android && ./gradlew assembleRelease -PsplitApk=true && cd ..", "build:debug": "cd android && ./gradlew assembleDebug && cd ..", "build:debug:split": "cd android && ./gradlew assembleDebug -PsplitApk=true && cd ..", - "cargo:update": "cd rust && cargo update -p zingolib -p zingoconfig --aggressive" + "cargo:update": "cd rust && cargo update -p zingolib --aggressive && cd ..", + "cargo:clean": "cd rust && cargo clean && cd .." }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.2.0", diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 27da87f95..db0d14429 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -154,9 +154,9 @@ checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "askama" @@ -181,7 +181,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -218,18 +218,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -537,7 +537,7 @@ dependencies = [ [[package]] name = "build_utils" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?tag=mob-release-1.4.3#9fa9940760431c137c2e46e115dd2a296808ca7f" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" [[package]] name = "bumpalo" @@ -610,9 +610,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.10" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -701,7 +704,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -718,9 +721,9 @@ checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "core-foundation" @@ -740,9 +743,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -800,7 +803,7 @@ dependencies = [ [[package]] name = "darkside-tests" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?tag=mob-release-1.4.3#9fa9940760431c137c2e46e115dd2a296808ca7f" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" dependencies = [ "futures-util", "hex", @@ -821,9 +824,6 @@ dependencies = [ "tower", "zcash_client_backend", "zcash_primitives", - "zingo-testutils", - "zingo-testvectors", - "zingoconfig", "zingolib", ] @@ -928,7 +928,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -979,9 +979,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "ff" @@ -1121,7 +1121,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1234,7 +1234,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.3.0", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -1243,9 +1243,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes 1.7.1", @@ -1253,7 +1253,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.3.0", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -1474,7 +1474,7 @@ dependencies = [ "bytes 1.7.1", "futures-channel", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -1619,9 +1619,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -1691,9 +1691,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -1720,11 +1720,11 @@ dependencies = [ [[package]] name = "known-folders" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4397c789f2709d23cfcb703b316e0766a8d4b17db2d47b0ab096ef6047cae1d8" +checksum = "b7d9a1740cc8b46e259a0eb787d79d855e79ff10b9855a5eba58868d5da7927c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1738,9 +1738,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libm" @@ -1993,9 +1993,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -2035,7 +2035,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -2194,7 +2194,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.3.0", + "indexmap 2.5.0", ] [[package]] @@ -2214,7 +2214,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -2278,12 +2278,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -2366,7 +2366,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.74", + "syn 2.0.77", "tempfile", ] @@ -2380,7 +2380,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -2400,9 +2400,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2551,9 +2551,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -2618,7 +2618,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "http-body-util", @@ -2708,8 +2708,6 @@ dependencies = [ "json", "regchest_utils", "tokio", - "zingo-testutils", - "zingoconfig", "zingomobile_utils", ] @@ -2733,7 +2731,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.74", + "syn 2.0.77", "walkdir", ] @@ -2755,9 +2753,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -2934,7 +2932,7 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3008,9 +3006,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.206" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -3027,20 +3025,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.206" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.124" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", "memchr", @@ -3056,7 +3054,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3092,7 +3090,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.3.0", + "indexmap 2.5.0", "itoa", "ryu", "serde", @@ -3144,6 +3142,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -3233,9 +3237,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -3325,7 +3329,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3336,7 +3340,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "test-case-core", ] @@ -3368,7 +3372,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3439,9 +3443,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes 1.7.1", @@ -3473,7 +3477,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3582,7 +3586,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3607,15 +3611,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3637,7 +3641,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3813,7 +3817,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95e86ccd44c138ba12b9132decbabeed84bf686ebe4b6538a5e489a243a7c2c9" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3844,7 +3848,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.74", + "syn 2.0.77", "toml", "uniffi_meta", ] @@ -3995,34 +3999,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -4032,9 +4037,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4042,28 +4047,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -4538,7 +4543,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4558,7 +4563,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4573,14 +4578,13 @@ dependencies = [ "tokio", "uniffi", "uniffi_build", - "zingoconfig", "zingolib", ] [[package]] name = "zingo-memo" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?tag=mob-release-1.4.3#9fa9940760431c137c2e46e115dd2a296808ca7f" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" dependencies = [ "zcash_address", "zcash_client_backend", @@ -4592,7 +4596,7 @@ dependencies = [ [[package]] name = "zingo-netutils" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?tag=mob-release-1.4.3#9fa9940760431c137c2e46e115dd2a296808ca7f" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" dependencies = [ "http 0.2.12", "http-body 0.4.6", @@ -4611,62 +4615,39 @@ dependencies = [ [[package]] name = "zingo-status" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?tag=mob-release-1.4.3#9fa9940760431c137c2e46e115dd2a296808ca7f" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" dependencies = [ "zcash_primitives", ] [[package]] -name = "zingo-testutils" +name = "zingo-sync" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?tag=mob-release-1.4.3#9fa9940760431c137c2e46e115dd2a296808ca7f" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" dependencies = [ - "http 0.2.12", + "crossbeam-channel", + "futures", + "getset", "incrementalmerkletree", - "json", - "log", - "nonempty", + "memuse", "orchard", - "portpicker", - "tempdir", + "rayon", + "sapling-crypto", + "shardtree", "tokio", "tonic", - "zcash_address", + "tracing", "zcash_client_backend", + "zcash_keys", + "zcash_note_encryption", "zcash_primitives", "zingo-netutils", - "zingo-status", - "zingo-testvectors", - "zingoconfig", - "zingolib", -] - -[[package]] -name = "zingo-testvectors" -version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?tag=mob-release-1.4.3#9fa9940760431c137c2e46e115dd2a296808ca7f" -dependencies = [ - "zcash_primitives", - "zingoconfig", -] - -[[package]] -name = "zingoconfig" -version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?tag=mob-release-1.4.3#9fa9940760431c137c2e46e115dd2a296808ca7f" -dependencies = [ - "dirs", - "http 0.2.12", - "log", - "log4rs", - "tempdir", - "zcash_primitives", ] [[package]] name = "zingolib" version = "0.2.0" -source = "git+https://github.com/zingolabs/zingolib?tag=mob-release-1.4.3#9fa9940760431c137c2e46e115dd2a296808ca7f" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" dependencies = [ "append-only-vec", "base58", @@ -4676,6 +4657,7 @@ dependencies = [ "byteorder", "bytes 0.4.12", "chrono", + "dirs", "enum_dispatch", "ff", "futures", @@ -4690,6 +4672,7 @@ dependencies = [ "jubjub", "lazy_static", "log", + "log4rs", "nonempty", "orchard", "proptest", @@ -4722,7 +4705,7 @@ dependencies = [ "zingo-memo", "zingo-netutils", "zingo-status", - "zingoconfig", + "zingo-sync", "zip32", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 878d1bc2f..cb81a2bda 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,8 +7,7 @@ members = [ resolver = "2" [workspace.dependencies] -zingolib = { git="https://github.com/zingolabs/zingolib", default-features=true, tag = "mob-release-1.4.3" } -zingoconfig = { git="https://github.com/zingolabs/zingolib", default-features=true, tag = "mob-release-1.4.3" } +zingolib = { git="https://github.com/zingolabs/zingolib", default-features=true, branch = "dev", features=["sync"] } uniffi = "0.27" tokio = { version = "1.24", features = [ "full" ] } diff --git a/rust/android/Cargo.toml b/rust/android/Cargo.toml index 4adaa2fda..249585dae 100644 --- a/rust/android/Cargo.toml +++ b/rust/android/Cargo.toml @@ -9,11 +9,9 @@ ci = [] regchest = [] [dev-dependencies] -zingoconfig = { workspace = true } zingomobile_utils = { path = "../zingomobile_utils" } regchest_utils = { git="https://github.com/zingolabs/zingo-regchest", default-features=true, branch = "dev" } -zingo-testutils = { git="https://github.com/zingolabs/zingolib", default-features=true, tag = "mob-release-1.4.3" } -darkside-tests = { git="https://github.com/zingolabs/zingolib", default-features=true, tag = "mob-release-1.4.3" } +darkside-tests = { git="https://github.com/zingolabs/zingolib", default-features=true, branch = "dev" } json = "0.12.4" env_logger = "0.10.0" tokio = { workspace = true } diff --git a/rust/android/tests/e2e_tests.rs b/rust/android/tests/e2e_tests.rs index 100febbca..6af15671d 100644 --- a/rust/android/tests/e2e_tests.rs +++ b/rust/android/tests/e2e_tests.rs @@ -46,7 +46,7 @@ mod e2e { async fn simple_sync() { let darkside_handler = DarksideHandler::new(Some(20000)); - let server_id = zingoconfig::construct_lightwalletd_uri(Some(format!( + let server_id = zingolib::config::construct_lightwalletd_uri(Some(format!( "http://127.0.0.1:{}", darkside_handler.grpc_port ))); diff --git a/rust/lib/Cargo.toml b/rust/lib/Cargo.toml index ea9b3f8e1..6471c11d7 100644 --- a/rust/lib/Cargo.toml +++ b/rust/lib/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" [dependencies] zingolib = { workspace = true } -zingoconfig = { workspace = true } http = "0.2.4" lazy_static = "1.4.0" base64 = "0.22" diff --git a/rust/lib/src/lib.rs b/rust/lib/src/lib.rs index ab1ec1337..e48d2ff7f 100644 --- a/rust/lib/src/lib.rs +++ b/rust/lib/src/lib.rs @@ -14,7 +14,7 @@ use base64::Engine; use base64::engine::general_purpose::STANDARD; use std::cell::RefCell; use std::sync::{Arc, Mutex}; -use zingoconfig::{construct_lightwalletd_uri, ChainType, RegtestNetwork, ZingoConfig}; +use zingolib::config::{construct_lightwalletd_uri, ChainType, RegtestNetwork, ZingoConfig}; use zingolib::{commands, lightclient::LightClient, wallet::WalletBase}; // We'll use a MUTEX to store a global lightclient instance, @@ -48,7 +48,7 @@ fn construct_uri_load_config( "regtest" => ChainType::Regtest(RegtestNetwork::all_upgrades_active()), _ => return Err("Error: Not a valid chain hint!".to_string()), }; - let mut config = match zingoconfig::load_clientconfig( + let mut config = match zingolib::config::load_clientconfig( lightwalletd_uri.clone(), None, chaintype, @@ -244,11 +244,11 @@ pub fn get_latest_block_server(server_uri: String) -> String { } pub fn get_developer_donation_address() -> String { - zingoconfig::DEVELOPER_DONATION_ADDRESS.to_string() + zingolib::config::DEVELOPER_DONATION_ADDRESS.to_string() } pub fn get_zennies_for_zingo_donation_address() -> String { - zingoconfig::ZENNIES_FOR_ZINGO_DONATION_ADDRESS.to_string() + zingolib::config::ZENNIES_FOR_ZINGO_DONATION_ADDRESS.to_string() } pub fn get_transaction_summaries() -> String { From 8f9a66956080e6ab048b631490f6ee4d24a470cb Mon Sep 17 00:00:00 2001 From: JC Date: Tue, 3 Sep 2024 18:50:05 -0600 Subject: [PATCH 3/9] fix: darkside feature added --- rust/Cargo.lock | 2 +- rust/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index db0d14429..d17605243 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -2356,7 +2356,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes 1.7.1", - "heck 0.4.1", + "heck 0.5.0", "itertools", "log", "multimap", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index cb81a2bda..7316f99bb 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,7 +7,7 @@ members = [ resolver = "2" [workspace.dependencies] -zingolib = { git="https://github.com/zingolabs/zingolib", default-features=true, branch = "dev", features=["sync"] } +zingolib = { git="https://github.com/zingolabs/zingolib", default-features=true, branch = "dev", features=["sync", "darkside_tests", "testvectors"] } uniffi = "0.27" tokio = { version = "1.24", features = [ "full" ] } From 50b17639be72f4acc2fb8b69e6a36c3f84fb9687 Mon Sep 17 00:00:00 2001 From: JC Date: Tue, 3 Sep 2024 20:23:45 -0600 Subject: [PATCH 4/9] fix: zingo_testutils fixedin tests --- rust/Cargo.lock | 4 ++++ rust/Cargo.toml | 2 +- rust/android/Cargo.toml | 1 + rust/android/tests/e2e_tests.rs | 2 +- rust/android/tests/integration_tests.rs | 2 +- rust/lib/Cargo.toml | 2 -- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index d17605243..ea1c5c8a9 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -2708,6 +2708,7 @@ dependencies = [ "json", "regchest_utils", "tokio", + "zingolib", "zingomobile_utils", ] @@ -4675,6 +4676,7 @@ dependencies = [ "log4rs", "nonempty", "orchard", + "portpicker", "proptest", "prost", "rand 0.8.5", @@ -4690,6 +4692,8 @@ dependencies = [ "sha2 0.9.9", "shardtree", "subtle", + "tempdir", + "tempfile", "test-case", "thiserror", "tokio", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 7316f99bb..1075a3294 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,7 +7,7 @@ members = [ resolver = "2" [workspace.dependencies] -zingolib = { git="https://github.com/zingolabs/zingolib", default-features=true, branch = "dev", features=["sync", "darkside_tests", "testvectors"] } +zingolib = { git="https://github.com/zingolabs/zingolib", default-features=true, branch = "dev", features=["sync", "test-elevation"] } uniffi = "0.27" tokio = { version = "1.24", features = [ "full" ] } diff --git a/rust/android/Cargo.toml b/rust/android/Cargo.toml index 249585dae..aa92db553 100644 --- a/rust/android/Cargo.toml +++ b/rust/android/Cargo.toml @@ -9,6 +9,7 @@ ci = [] regchest = [] [dev-dependencies] +zingolib = { workspace = true } zingomobile_utils = { path = "../zingomobile_utils" } regchest_utils = { git="https://github.com/zingolabs/zingo-regchest", default-features=true, branch = "dev" } darkside-tests = { git="https://github.com/zingolabs/zingolib", default-features=true, branch = "dev" } diff --git a/rust/android/tests/e2e_tests.rs b/rust/android/tests/e2e_tests.rs index 6af15671d..9c9d8c926 100644 --- a/rust/android/tests/e2e_tests.rs +++ b/rust/android/tests/e2e_tests.rs @@ -1,7 +1,7 @@ // end-to-end tests currently require an emulated AVD and `yarn start` to be launched manually before running tests #[cfg(not(feature = "regchest"))] -use zingo_testutils::{self, scenarios}; +use zingolib::testutils::{scenarios}; #[cfg(feature = "ci")] const UNIX_SOCKET: Option<&str> = Some("/Users/runner/.colima/default/docker.sock"); diff --git a/rust/android/tests/integration_tests.rs b/rust/android/tests/integration_tests.rs index 57907464c..186141b33 100644 --- a/rust/android/tests/integration_tests.rs +++ b/rust/android/tests/integration_tests.rs @@ -1,5 +1,5 @@ #[cfg(not(feature = "regchest"))] -use zingo_testutils::{self, scenarios}; +use zingolib::testutils::{scenarios}; #[cfg(feature = "ci")] const UNIX_SOCKET: Option<&str> = Some("/Users/runner/.colima/default/docker.sock"); diff --git a/rust/lib/Cargo.toml b/rust/lib/Cargo.toml index 6471c11d7..81bf7243a 100644 --- a/rust/lib/Cargo.toml +++ b/rust/lib/Cargo.toml @@ -22,7 +22,5 @@ crate-type = ["cdylib", "staticlib"] name = "zingo" [[bin]] -# This can be whatever name makes sense for your project, -# but the rest of this tutorial assumes uniffi-bindgen. name = "uniffi-bindgen" path = "uniffi-bindgen.rs" \ No newline at end of file From e16a412c3d4c61e1671770b8a4026d1be9ee273b Mon Sep 17 00:00:00 2001 From: JC Date: Wed, 4 Sep 2024 11:31:02 -0600 Subject: [PATCH 5/9] fix: put new status in history & details --- app/translations/en.json | 4 +- app/translations/es.json | 4 +- app/translations/pt.json | 4 +- app/translations/ru.json | 4 +- .../components/ValueTransferDetail.tsx | 15 ++ .../History/components/ValueTransferLine.tsx | 150 +++++++++--------- 6 files changed, 104 insertions(+), 77 deletions(-) diff --git a/app/translations/en.json b/app/translations/en.json index 160318add..3be5f718b 100644 --- a/app/translations/en.json +++ b/app/translations/en.json @@ -527,7 +527,9 @@ "address-http": "Zingo has no idea who sent you this Address! It's entirely up to you to authenticate the Sender.", "address-https": "Zingo-Authenticated Address", "type": "Type", - "not-confirmed": "Transaction not yet confirmed" + "not-confirmed": "Transaction not yet confirmed", + "transmitted": "Transmitted", + "mempool": "In Mempool" }, "report": { "title": "Sync / Rescan Report", diff --git a/app/translations/es.json b/app/translations/es.json index 08e71508f..0614fc0b8 100644 --- a/app/translations/es.json +++ b/app/translations/es.json @@ -527,7 +527,9 @@ "address-http": "¡Zingo no tiene idea de quién te envió esta dirección! Depende totalmente de ti autenticar al remitente.", "address-https": "Dirección autenticada por Zingo", "type": "Tipo", - "not-confirmed": "Transacción no confirmada todavía" + "not-confirmed": "Transacción no confirmada todavía", + "transmitted": "Transmitida", + "mempool": "En Mempool" }, "report": { "title": "Informe de Sincronización", diff --git a/app/translations/pt.json b/app/translations/pt.json index d0c5b63ae..c29ccdacc 100644 --- a/app/translations/pt.json +++ b/app/translations/pt.json @@ -527,7 +527,9 @@ "address-http": "Zingo não tem ideia de quem lhe enviou este Endereço! Você deve autenticar o Remetente.", "address-https": "Endereço Zingo-Authenticated", "type": "Tipo", - "not-confirmed": "Transação ainda não confirmada" + "not-confirmed": "Transação ainda não confirmada", + "transmitted": "Transmitida", + "mempool": "Em Mempool" }, "report": { "title": "Relatório de Sincronização / Rescan", diff --git a/app/translations/ru.json b/app/translations/ru.json index 41efd1d63..6bc59f659 100644 --- a/app/translations/ru.json +++ b/app/translations/ru.json @@ -527,7 +527,9 @@ "address-http": "Zingo не знает, кто отправил вам этот адрес! Только вы можете проверить подлинность отправителя.", "address-https": "Zingo-аутентифицированный адрес", "type": "Тип", - "not-confirmed": "Транзакция еще не подтверждена" + "not-confirmed": "Транзакция еще не подтверждена", + "transmitted": "Передано", + "mempool": "B Mempool" }, "report": { "title": "Отчёт о синхронизации", diff --git a/components/History/components/ValueTransferDetail.tsx b/components/History/components/ValueTransferDetail.tsx index 27e890ad1..f9758718a 100644 --- a/components/History/components/ValueTransferDetail.tsx +++ b/components/History/components/ValueTransferDetail.tsx @@ -33,6 +33,7 @@ import AddressItem from '../../Components/AddressItem'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; // this is for http. (red) import { faTriangleExclamation, faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons'; +import { RPCValueTransfersStatusEnum } from '../../../app/rpc/enums/RPCValueTransfersStatusEnum'; // this is for https. (primary) //import { faLock } from '@fortawesome/free-solid-svg-icons'; @@ -239,6 +240,20 @@ const ValueTransferDetail: React.FunctionComponent = ( )} + {vt.confirmations === 0 && ( + + {(translate(`history.${vt.status}`) as string) + ' - ' + (translate('history.not-confirmed') as string)} + + )} + diff --git a/components/History/components/ValueTransferLine.tsx b/components/History/components/ValueTransferLine.tsx index 8df27f8b2..b368c664c 100644 --- a/components/History/components/ValueTransferLine.tsx +++ b/components/History/components/ValueTransferLine.tsx @@ -17,6 +17,7 @@ import 'moment/locale/ru'; import { ContextAppLoaded } from '../../../app/context'; import AddressItem from '../../Components/AddressItem'; +import { RPCValueTransfersStatusEnum } from '../../../app/rpc/enums/RPCValueTransfersStatusEnum'; type ValueTransferLineProps = { index: number; @@ -99,7 +100,7 @@ const ValueTransferLine: React.FunctionComponent = ({ = ({ : 'solid' : 'solid', }}> - - - - - {!!vt.address && vt.confirmations > 0 && ( - - {}} openModal={() => {}} /> - - )} - 0 ? 'row' : 'column', - alignItems: vt.kind === ValueTransferKindEnum.Sent && vt.confirmations > 0 ? 'center' : 'flex-start', - }}> - + + + + + {!!vt.address && vt.confirmations > 0 && ( + + {}} openModal={() => {}} /> + + )} + 0 ? 'row' : 'column', + alignItems: vt.kind === ValueTransferKindEnum.Sent && vt.confirmations > 0 ? 'center' : 'flex-start', }}> - {vt.kind === ValueTransferKindEnum.Sent && vt.confirmations === 0 - ? (translate('history.sending') as string) - : vt.kind === ValueTransferKindEnum.Sent && vt.confirmations > 0 - ? (translate('history.sent') as string) - : vt.kind === ValueTransferKindEnum.Received && vt.confirmations === 0 - ? (translate('history.receiving') as string) - : vt.kind === ValueTransferKindEnum.Received && vt.confirmations > 0 - ? (translate('history.received') as string) - : vt.kind === ValueTransferKindEnum.MemoToSelf && vt.confirmations === 0 - ? (translate('history.sendingtoself') as string) - : vt.kind === ValueTransferKindEnum.MemoToSelf && vt.confirmations > 0 - ? (translate('history.memotoself') as string) - : vt.kind === ValueTransferKindEnum.SendToSelf && vt.confirmations === 0 - ? (translate('history.sendingtoself') as string) - : vt.kind === ValueTransferKindEnum.SendToSelf && vt.confirmations > 0 - ? (translate('history.sendtoself') as string) - : vt.kind === ValueTransferKindEnum.Shield && vt.confirmations === 0 - ? (translate('history.shielding') as string) - : vt.kind === ValueTransferKindEnum.Shield && vt.confirmations > 0 - ? (translate('history.shield') as string) - : ''} - - {vt.confirmations === 0 && ( - {('[ ' + translate('history.not-confirmed') + ' ] - ' + vt.status) as string} + {vt.kind === ValueTransferKindEnum.Sent && vt.confirmations === 0 + ? (translate('history.sending') as string) + : vt.kind === ValueTransferKindEnum.Sent && vt.confirmations > 0 + ? (translate('history.sent') as string) + : vt.kind === ValueTransferKindEnum.Received && vt.confirmations === 0 + ? (translate('history.receiving') as string) + : vt.kind === ValueTransferKindEnum.Received && vt.confirmations > 0 + ? (translate('history.received') as string) + : vt.kind === ValueTransferKindEnum.MemoToSelf && vt.confirmations === 0 + ? (translate('history.sendingtoself') as string) + : vt.kind === ValueTransferKindEnum.MemoToSelf && vt.confirmations > 0 + ? (translate('history.memotoself') as string) + : vt.kind === ValueTransferKindEnum.SendToSelf && vt.confirmations === 0 + ? (translate('history.sendingtoself') as string) + : vt.kind === ValueTransferKindEnum.SendToSelf && vt.confirmations > 0 + ? (translate('history.sendtoself') as string) + : vt.kind === ValueTransferKindEnum.Shield && vt.confirmations === 0 + ? (translate('history.shielding') as string) + : vt.kind === ValueTransferKindEnum.Shield && vt.confirmations > 0 + ? (translate('history.shield') as string) + : ''} - )} - - {vt.time ? moment((vt.time || 0) * 1000).format('MMM D, h:mm a') : '--'} - {haveMemo && ( - - )} + + {vt.time ? moment((vt.time || 0) * 1000).format('MMM D, h:mm a') : '--'} + {haveMemo && ( + + )} + + - + {vt.confirmations === 0 && ( + + {translate(`history.${vt.status}`) as string} + + )} From f5d53e3fd4449c7ddc5cdd1b16a9fd6bf9a6d6ec Mon Sep 17 00:00:00 2001 From: JC Date: Wed, 4 Sep 2024 11:44:32 -0600 Subject: [PATCH 6/9] fix: snapshots updated --- .../__snapshots__/History.snapshot.tsx.snap | 4014 +++++++++-------- components/Send/Send.tsx | 25 +- 2 files changed, 2079 insertions(+), 1960 deletions(-) diff --git a/__tests__/__snapshots__/History.snapshot.tsx.snap b/__tests__/__snapshots__/History.snapshot.tsx.snap index 68e2a4333..68aebf68a 100644 --- a/__tests__/__snapshots__/History.snapshot.tsx.snap +++ b/__tests__/__snapshots__/History.snapshot.tsx.snap @@ -895,7 +895,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -904,234 +904,246 @@ exports[`Component History - test History currency USD, privacy high & mode adva - < - color="#18bd18" - icon={ - { - "icon": [ - 384, - 512, - [ - 8595, - ], - "f063", - "M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z", - ], - "iconName": "arrow-down", - "prefix": "fas", - } - } - size={30} - style={ - { - "marginLeft": 5, - "marginRight": 5, - "marginTop": 0, - } - } - /> - - - - text translated - + /> + + - Dec 13, 8:00 am + text translated + + + Dec 13, 8:00 am + + - - - + > + " - > - - - - + + + + + + - - - - -.---- - + > + -.---- + + @@ -1158,7 +1170,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -1167,259 +1179,271 @@ exports[`Component History - test History currency USD, privacy high & mode adva - < - color="#18bd18" - icon={ - { - "icon": [ - 384, - 512, - [ - 8595, - ], - "f063", - "M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z", - ], - "iconName": "arrow-down", - "prefix": "fas", - } - } - size={30} - style={ - { - "marginLeft": 5, - "marginRight": 5, - "marginTop": 0, - } - } - /> - - - - text translated - + /> + + - Dec 13, 8:00 am + text translated - < - color="#5a8c5a" - icon={ - { - "icon": [ - 512, - 512, - [ - 128489, - 61669, - ], - "f075", - "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", - ], - "iconName": "comment", - "prefix": "fas", - } - } - size={15} + + > + + Dec 13, 8:00 am + + < + color="#5a8c5a" + icon={ + { + "icon": [ + 512, + 512, + [ + 128489, + 61669, + ], + "f075", + "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", + ], + "iconName": "comment", + "prefix": "fas", + } + } + size={15} + style={ + { + "marginLeft": 10, + } + } + /> + - - - + > + " - > - - - - + + + + + + - - - - -.---- - + > + -.---- + + @@ -1446,7 +1470,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -1455,71 +1479,61 @@ exports[`Component History - test History currency USD, privacy high & mode adva - < - color="#c3c3c3" - icon={ - { - "icon": [ - 384, - 512, - [ - 8593, - ], - "f062", - "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z", - ], - "iconName": "arrow-up", - "prefix": "fas", - } - } - size={30} - style={ - { - "marginLeft": 5, - "marginRight": 5, - "marginTop": 0, - } - } - /> - - - - text translated - + /> + + @@ -1527,187 +1541,209 @@ exports[`Component History - test History currency USD, privacy high & mode adva style={ { "color": "#c3c3c3", - "opacity": 0.65, + "fontSize": 18, + "fontWeight": "bold", + "opacity": 1, } } > - Dec 13, 8:00 am + text translated - < - color="#5a8c5a" - icon={ - { - "icon": [ - 512, - 512, - [ - 128489, - 61669, - ], - "f075", - "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", - ], - "iconName": "comment", - "prefix": "fas", - } - } - size={15} + + > + + Dec 13, 8:00 am + + < + color="#5a8c5a" + icon={ + { + "icon": [ + 512, + 512, + [ + 128489, + 61669, + ], + "f075", + "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", + ], + "iconName": "comment", + "prefix": "fas", + } + } + size={15} + style={ + { + "marginLeft": 10, + } + } + /> + - - - + > + " - > - - - - + + + + + + - - - - -.---- - + > + -.---- + + @@ -1734,7 +1770,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -1743,71 +1779,61 @@ exports[`Component History - test History currency USD, privacy high & mode adva - < - color="#c3c3c3" - icon={ - { - "icon": [ - 384, - 512, - [ - 8593, - ], - "f062", - "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z", - ], - "iconName": "arrow-up", - "prefix": "fas", - } - } - size={30} - style={ - { - "marginLeft": 5, - "marginRight": 5, - "marginTop": 0, - } - } - /> - - - - text translated - + /> + + @@ -1815,162 +1841,184 @@ exports[`Component History - test History currency USD, privacy high & mode adva style={ { "color": "#c3c3c3", - "opacity": 0.65, + "fontSize": 18, + "fontWeight": "bold", + "opacity": 1, } } > - Dec 13, 8:00 am + text translated + + + Dec 13, 8:00 am + + - - - + > + " - > - - - - + + + + + + - - - - -.---- - + > + -.---- + + @@ -1997,7 +2045,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -2006,145 +2054,135 @@ exports[`Component History - test History currency USD, privacy high & mode adva - < - color="#c3c3c3" - icon={ - { - "icon": [ - 384, - 512, - [ - 8593, - ], - "f062", - "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z", - ], - "iconName": "arrow-up", - "prefix": "fas", - } - } - size={30} + - - - - + < + color="#c3c3c3" + icon={ + { + "icon": [ + 384, + 512, + [ + 8593, + ], + "f062", + "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z", + ], + "iconName": "arrow-up", + "prefix": "fas", + } + } + size={30} style={ { - "alignItems": "flex-start", - "display": "flex", - "flexDirection": "row", + "marginLeft": 5, + "marginRight": 5, + "marginTop": 0, } } - > + /> + + + - - sent-ad...4567890 - + + sent-ad...4567890 + + - - - - text translated - - Dec 13, 8:00 am + text translated - < - color="#5a8c5a" - icon={ - { - "icon": [ - 512, - 512, - [ - 128489, - 61669, - ], - "f075", - "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", - ], - "iconName": "comment", - "prefix": "fas", - } - } - size={15} + + > + + Dec 13, 8:00 am + + < + color="#5a8c5a" + icon={ + { + "icon": [ + 512, + 512, + [ + 128489, + 61669, + ], + "f075", + "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", + ], + "iconName": "comment", + "prefix": "fas", + } + } + size={15} + style={ + { + "marginLeft": 10, + } + } + /> + - - - + > + " - > - - - - + + + + + + - - - - -.---- - + > + -.---- + + @@ -2799,7 +2859,7 @@ exports[`Component History - test History no currency, privacy normal & mode bas "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -2808,235 +2868,247 @@ exports[`Component History - test History no currency, privacy normal & mode bas - < - color="#18bd18" - icon={ - { - "icon": [ - 384, - 512, - [ - 8595, - ], - "f063", - "M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z", - ], - "iconName": "arrow-down", - "prefix": "fas", - } - } - size={30} - style={ - { - "marginLeft": 5, - "marginRight": 5, - "marginTop": 0, - } - } - /> - - - - text translated - + /> + + - Dec 13, 8:00 am + text translated - - - - + + + Dec 13, 8:00 am + + + + - + > + " - > - - - - + + + + + + - - - - 0.0009 - + testID="undefined.big-part" + > + 0.0009 + + @@ -3063,7 +3135,7 @@ exports[`Component History - test History no currency, privacy normal & mode bas "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -3072,274 +3144,286 @@ exports[`Component History - test History no currency, privacy normal & mode bas - < - color="#18bd18" - icon={ - { - "icon": [ - 384, - 512, - [ - 8595, - ], - "f063", - "M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z", - ], - "iconName": "arrow-down", - "prefix": "fas", - } - } - size={30} - style={ - { - "marginLeft": 5, - "marginRight": 5, - "marginTop": 0, - } - } - /> - - - - text translated - + /> + + - Dec 13, 8:00 am + text translated - < - color="#5a8c5a" - icon={ - { - "icon": [ - 512, - 512, - [ - 128489, - 61669, - ], - "f075", - "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", - ], - "iconName": "comment", - "prefix": "fas", - } - } - size={15} + + > + + Dec 13, 8:00 am + + < + color="#5a8c5a" + icon={ + { + "icon": [ + 512, + 512, + [ + 128489, + 61669, + ], + "f075", + "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", + ], + "iconName": "comment", + "prefix": "fas", + } + } + size={15} + style={ + { + "marginLeft": 10, + } + } + /> + - - - + > + " - > - - - - + + + + + + - - - - 0.7765 - - + 0.7765 + + - 4321 - + testID="undefined.small-part" + > + 4321 + + @@ -3366,7 +3450,7 @@ exports[`Component History - test History no currency, privacy normal & mode bas "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -3375,71 +3459,61 @@ exports[`Component History - test History no currency, privacy normal & mode bas - < - color="#c3c3c3" - icon={ - { - "icon": [ - 384, - 512, - [ - 8593, - ], - "f062", - "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z", - ], - "iconName": "arrow-up", - "prefix": "fas", - } - } - size={30} + - - + > + < + color="#c3c3c3" + icon={ + { + "icon": [ + 384, + 512, + [ + 8593, + ], + "f062", + "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z", + ], + "iconName": "arrow-up", + "prefix": "fas", + } + } + size={30} + style={ + { + "marginLeft": 5, + "marginRight": 5, + "marginTop": 0, + } + } + /> + - - text translated - @@ -3447,188 +3521,210 @@ exports[`Component History - test History no currency, privacy normal & mode bas style={ { "color": "#c3c3c3", - "opacity": 0.65, + "fontSize": 18, + "fontWeight": "bold", + "opacity": 1, } } > - Dec 13, 8:00 am + text translated - < - color="#5a8c5a" - icon={ - { - "icon": [ - 512, - 512, - [ - 128489, - 61669, - ], - "f075", - "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", - ], - "iconName": "comment", - "prefix": "fas", - } - } - size={15} + + > + + Dec 13, 8:00 am + + < + color="#5a8c5a" + icon={ + { + "icon": [ + 512, + 512, + [ + 128489, + 61669, + ], + "f075", + "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", + ], + "iconName": "comment", + "prefix": "fas", + } + } + size={15} + style={ + { + "marginLeft": 10, + } + } + /> + - - - + > + " - > - - - - + + + + + + - - - - 0.0000 - + testID="undefined.big-part" + > + 0.0000 + + @@ -3655,7 +3751,7 @@ exports[`Component History - test History no currency, privacy normal & mode bas "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -3664,71 +3760,61 @@ exports[`Component History - test History no currency, privacy normal & mode bas - < - color="#c3c3c3" - icon={ - { - "icon": [ - 384, - 512, - [ - 8593, - ], - "f062", - "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z", - ], - "iconName": "arrow-up", - "prefix": "fas", - } - } - size={30} - style={ - { - "marginLeft": 5, - "marginRight": 5, - "marginTop": 0, - } - } - /> - - - - text translated - + /> + + @@ -3736,163 +3822,185 @@ exports[`Component History - test History no currency, privacy normal & mode bas style={ { "color": "#c3c3c3", - "opacity": 0.65, + "fontSize": 18, + "fontWeight": "bold", + "opacity": 1, } } > - Dec 13, 8:00 am + text translated + + + Dec 13, 8:00 am + + - - - + > + " - > - - - - + + + + + + - - - - 0.0000 - + testID="undefined.big-part" + > + 0.0000 + + @@ -3919,7 +4027,7 @@ exports[`Component History - test History no currency, privacy normal & mode bas "borderBottomWidth": 1.5, "borderStyle": "solid", "display": "flex", - "flexDirection": "row", + "flexDirection": "column", "marginTop": 15, "paddingBottom": 10, } @@ -3928,145 +4036,135 @@ exports[`Component History - test History no currency, privacy normal & mode bas - < - color="#c3c3c3" - icon={ - { - "icon": [ - 384, - 512, - [ - 8593, - ], - "f062", - "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z", - ], - "iconName": "arrow-up", - "prefix": "fas", - } - } - size={30} + - - - - + < + color="#c3c3c3" + icon={ + { + "icon": [ + 384, + 512, + [ + 8593, + ], + "f062", + "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z", + ], + "iconName": "arrow-up", + "prefix": "fas", + } + } + size={30} style={ { - "alignItems": "flex-start", - "display": "flex", - "flexDirection": "row", + "marginLeft": 5, + "marginRight": 5, + "marginTop": 0, } } - > + /> + + + - - sent-ad...4567890 - + + sent-ad...4567890 + + - - - - text translated - - Dec 13, 8:00 am + text translated - < - color="#5a8c5a" - icon={ - { - "icon": [ - 512, - 512, - [ - 128489, - 61669, - ], - "f075", - "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", - ], - "iconName": "comment", - "prefix": "fas", - } - } - size={15} + + > + + Dec 13, 8:00 am + + < + color="#5a8c5a" + icon={ + { + "icon": [ + 512, + 512, + [ + 128489, + 61669, + ], + "f075", + "M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z", + ], + "iconName": "comment", + "prefix": "fas", + } + } + size={15} + style={ + { + "marginLeft": 10, + } + } + /> + - - - + > + " - > - - - - + + + + + + - - - - 0.1234 - - + 0.1234 + + - 5678 - + testID="undefined.small-part" + > + 5678 + + diff --git a/components/Send/Send.tsx b/components/Send/Send.tsx index 928d75185..7b49a8212 100644 --- a/components/Send/Send.tsx +++ b/components/Send/Send.tsx @@ -835,19 +835,18 @@ const Send: React.FunctionComponent = ({ } }; - //console.log('render Send - 4', sendPageState); - console.log( - 'Render, spendable', - spendable, - 'maxAmount', - maxAmount, - 'Fee', - fee, - 'Amount', - sendPageState.toaddr.amount, - keyboardVisible, - contentHeight, - ); + //console.log( + // 'Render, spendable', + // spendable, + // 'maxAmount', + // maxAmount, + // 'Fee', + // fee, + // 'Amount', + // sendPageState.toaddr.amount, + // keyboardVisible, + // contentHeight, + //); const returnPage = ( Date: Sat, 7 Sep 2024 09:48:34 -0600 Subject: [PATCH 7/9] fix: using the last zingolib commit --- .../__snapshots__/History.snapshot.tsx.snap | 10 ---- app/rpc/RPC.ts | 3 + .../History/components/ValueTransferLine.tsx | 11 +++- rust/Cargo.lock | 56 +++++++++---------- rust/Cargo.toml | 2 +- 5 files changed, 42 insertions(+), 40 deletions(-) diff --git a/__tests__/__snapshots__/History.snapshot.tsx.snap b/__tests__/__snapshots__/History.snapshot.tsx.snap index 68aebf68a..3debc7ab0 100644 --- a/__tests__/__snapshots__/History.snapshot.tsx.snap +++ b/__tests__/__snapshots__/History.snapshot.tsx.snap @@ -948,7 +948,6 @@ exports[`Component History - test History currency USD, privacy high & mode adva = ({ //console.log('render ValueTransferLine - 5', index, nextLineWithSameTxid); + //if (index === 0) { + // vt.confirmations = 0; + // vt.status = RPCValueTransfersStatusEnum.transmitted; + //} + //if (index === 1) { + // vt.confirmations = 0; + // vt.status = RPCValueTransfersStatusEnum.mempool; + //} + return ( {month !== '' && ( @@ -121,7 +130,7 @@ const ValueTransferLine: React.FunctionComponent = ({ color={amountColor} /> - + {!!vt.address && vt.confirmations > 0 && ( {}} openModal={() => {}} /> diff --git a/rust/Cargo.lock b/rust/Cargo.lock index ea1c5c8a9..5f9fa2a1f 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -131,9 +131,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" [[package]] name = "append-only-vec" @@ -537,7 +537,7 @@ dependencies = [ [[package]] name = "build_utils" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#efc2fd5df328ea43195eecf8af0c7a5dae38eee2" [[package]] name = "bumpalo" @@ -610,9 +610,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.15" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "shlex", ] @@ -743,9 +743,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -803,7 +803,7 @@ dependencies = [ [[package]] name = "darkside-tests" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#efc2fd5df328ea43195eecf8af0c7a5dae38eee2" dependencies = [ "futures-util", "hex", @@ -2754,9 +2754,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" dependencies = [ "bitflags 2.6.0", "errno", @@ -2903,11 +2903,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3007,9 +3007,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -3026,9 +3026,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -3037,9 +3037,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -3514,9 +3514,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -3525,9 +3525,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes 1.7.1", "futures-core", @@ -4585,7 +4585,7 @@ dependencies = [ [[package]] name = "zingo-memo" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#efc2fd5df328ea43195eecf8af0c7a5dae38eee2" dependencies = [ "zcash_address", "zcash_client_backend", @@ -4597,7 +4597,7 @@ dependencies = [ [[package]] name = "zingo-netutils" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#efc2fd5df328ea43195eecf8af0c7a5dae38eee2" dependencies = [ "http 0.2.12", "http-body 0.4.6", @@ -4616,7 +4616,7 @@ dependencies = [ [[package]] name = "zingo-status" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#efc2fd5df328ea43195eecf8af0c7a5dae38eee2" dependencies = [ "zcash_primitives", ] @@ -4624,7 +4624,7 @@ dependencies = [ [[package]] name = "zingo-sync" version = "0.1.0" -source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#efc2fd5df328ea43195eecf8af0c7a5dae38eee2" dependencies = [ "crossbeam-channel", "futures", @@ -4648,7 +4648,7 @@ dependencies = [ [[package]] name = "zingolib" version = "0.2.0" -source = "git+https://github.com/zingolabs/zingolib?branch=dev#f3c51ec21e1391eeeedc73636e49750cdc97972e" +source = "git+https://github.com/zingolabs/zingolib?branch=dev#efc2fd5df328ea43195eecf8af0c7a5dae38eee2" dependencies = [ "append-only-vec", "base58", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 1075a3294..72abffaa5 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,7 +7,7 @@ members = [ resolver = "2" [workspace.dependencies] -zingolib = { git="https://github.com/zingolabs/zingolib", default-features=true, branch = "dev", features=["sync", "test-elevation"] } +zingolib = { git="https://github.com/zingolabs/zingolib", default-features=true, branch = "dev", features=["test-elevation"] } uniffi = "0.27" tokio = { version = "1.24", features = [ "full" ] } From 4df7f5ca17663a5a0bce6f6290a1d64c3a89592a Mon Sep 17 00:00:00 2001 From: JC Date: Tue, 10 Sep 2024 17:18:48 -0600 Subject: [PATCH 8/9] fix: final changes for transmitted & in mempool states --- app/translations/en.json | 2 +- app/translations/es.json | 2 +- app/translations/pt.json | 2 +- app/translations/ru.json | 2 +- .../components/ValueTransferDetail.tsx | 32 ++++++++----- .../History/components/ValueTransferLine.tsx | 47 +++++++++++++------ 6 files changed, 58 insertions(+), 29 deletions(-) diff --git a/app/translations/en.json b/app/translations/en.json index 7918dd0fc..1f1642924 100644 --- a/app/translations/en.json +++ b/app/translations/en.json @@ -403,7 +403,7 @@ "youreceived": "You received" }, "send": { - "Broadcast": "Successfully Broadcast Tx:", + "Broadcast": "Broadcasted and awaiting confirmation Tx:", "sending-error": "Error sending transaction", "title": "Send", "title-syncing": "Send - Syncing", diff --git a/app/translations/es.json b/app/translations/es.json index f41e11895..18891bd03 100644 --- a/app/translations/es.json +++ b/app/translations/es.json @@ -403,7 +403,7 @@ "youreceived": "Recibiste" }, "send": { - "Broadcast": "Transmitida con éxito Tx:", + "Broadcast": "Transmitida y esperando confirmación Tx:", "sending-error": "Error enviando transacción", "title": "Enviar", "title-syncing": "Enviar - Sincronizando", diff --git a/app/translations/pt.json b/app/translations/pt.json index ac4e3c0f5..0da8fd6de 100644 --- a/app/translations/pt.json +++ b/app/translations/pt.json @@ -403,7 +403,7 @@ "youreceived": "Você recebeu" }, "send": { - "Broadcast": "Transação concluída com sucesso:", + "Broadcast": "Transmitido e aguardando confirmação Tx:", "sending-error": "Erro ao enviar transação", "title": "Enviar", "title-syncing": "Enviar - Sincronizando", diff --git a/app/translations/ru.json b/app/translations/ru.json index 5c94ccb75..50ac04f0a 100644 --- a/app/translations/ru.json +++ b/app/translations/ru.json @@ -403,7 +403,7 @@ "youreceived": "Получено" }, "send": { - "Broadcast": "Успешная отправка, Tx:", + "Broadcast": "Транслируется и ожидает подтверждения Tx:", "sending-error": "Ошибка при отправке транзакции", "title": "Отправить", "title-syncing": "Отправить - Синхронизация", diff --git a/components/History/components/ValueTransferDetail.tsx b/components/History/components/ValueTransferDetail.tsx index 435ee032d..bf84f7d7c 100644 --- a/components/History/components/ValueTransferDetail.tsx +++ b/components/History/components/ValueTransferDetail.tsx @@ -251,17 +251,27 @@ const ValueTransferDetail: React.FunctionComponent = ( {vt.confirmations === 0 && ( - - {(translate(`history.${vt.status}`) as string) + ' - ' + (translate('history.not-confirmed') as string)} - + + {vt.status === RPCValueTransfersStatusEnum.transmitted && ( + + )} + + {(translate(`history.${vt.status}`) as string) + ' - ' + (translate('history.not-confirmed') as string)} + + )} diff --git a/components/History/components/ValueTransferLine.tsx b/components/History/components/ValueTransferLine.tsx index f7c077482..84b02ef9e 100644 --- a/components/History/components/ValueTransferLine.tsx +++ b/components/History/components/ValueTransferLine.tsx @@ -3,7 +3,14 @@ import React, { useContext, useEffect, useState } from 'react'; import { Platform, View } from 'react-native'; import { useTheme } from '@react-navigation/native'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; -import { IconDefinition, faArrowDown, faArrowUp, faRefresh, faComment } from '@fortawesome/free-solid-svg-icons'; +import { + IconDefinition, + faArrowDown, + faArrowUp, + faRefresh, + faComment, + faTriangleExclamation, +} from '@fortawesome/free-solid-svg-icons'; import { TouchableOpacity } from 'react-native-gesture-handler'; import ZecAmount from '../../Components/ZecAmount'; @@ -110,7 +117,7 @@ const ValueTransferLine: React.FunctionComponent = ({ style={{ display: 'flex', flexDirection: 'column', - alignItems: 'center', + alignItems: vt.status === RPCValueTransfersStatusEnum.transmitted ? 'center' : 'flex-start', marginTop: 15, paddingBottom: 10, borderBottomWidth: nextLineWithSameTxid ? (Platform.OS === GlobalConst.platformOSandroid ? 1 : 0.5) : 1.5, @@ -127,7 +134,7 @@ const ValueTransferLine: React.FunctionComponent = ({ style={{ marginLeft: 5, marginRight: 5, marginTop: 0 }} size={30} icon={vtIcon} - color={amountColor} + color={vt.status === RPCValueTransfersStatusEnum.transmitted ? colors.syncing : amountColor} /> @@ -194,17 +201,29 @@ const ValueTransferLine: React.FunctionComponent = ({ /> {vt.confirmations === 0 && ( - - {translate(`history.${vt.status}`) as string} - + + {vt.status === RPCValueTransfersStatusEnum.transmitted && ( + + )} + + {translate(`history.${vt.status}`) as string} + + )} From fcfe06bf239ce6df81fa38d1cf985adbe92f58e3 Mon Sep 17 00:00:00 2001 From: JC Date: Tue, 10 Sep 2024 17:29:33 -0600 Subject: [PATCH 9/9] fix: snapshots updated --- .../__snapshots__/History.snapshot.tsx.snap | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/__tests__/__snapshots__/History.snapshot.tsx.snap b/__tests__/__snapshots__/History.snapshot.tsx.snap index 3debc7ab0..7f7d89ee8 100644 --- a/__tests__/__snapshots__/History.snapshot.tsx.snap +++ b/__tests__/__snapshots__/History.snapshot.tsx.snap @@ -890,7 +890,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva