From e60888c3e8880ffd94cd802ee74ceb9c20b39b19 Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Fri, 26 Jul 2024 20:15:16 +0300 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=F0=9F=A6=8E=20=F0=9F=A4=8E=20bitkit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- yarn.lock | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 634f34ee1..ab2466eeb 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@synonymdev/react-native-lnurl": "0.0.10", "@synonymdev/result": "0.0.2", "@synonymdev/slashtags-keychain": "1.0.0", - "@synonymdev/slashtags-profile": "1.0.2", + "@synonymdev/slashtags-profile": "2.0.0", "@synonymdev/slashtags-url": "1.0.1", "@synonymdev/slashtags-widget-bitcoin-feed": "1.0.0", "@synonymdev/slashtags-widget-facts-feed": "1.1.0", diff --git a/yarn.lock b/yarn.lock index 90d771f15..a51a10f86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4710,14 +4710,13 @@ __metadata: languageName: node linkType: hard -"@synonymdev/slashtags-profile@npm:1.0.2": - version: 1.0.2 - resolution: "@synonymdev/slashtags-profile@npm:1.0.2" +"@synonymdev/slashtags-profile@npm:2.0.0": + version: 2.0.0 + resolution: "@synonymdev/slashtags-profile@npm:2.0.0" dependencies: "@synonymdev/slashtags-url": ^1.0.0-alpha.3 ajv: ^8.12.0 - b4a: ^1.6.3 - checksum: 582d43e7b72562b2d88ada51554e60c6d12a13e985420ac3f49bbc401c18094ffccb0875d2476cc21da0d85cd97dd91b294851875cf74f3de13e937be2f99963 + checksum: a9e61ede1d97fc3b1c40b478c6afb53a7b8d04c3c9bb9ee3eac1ed37616a2c97774c28493bdf8955592ab2cc5b6aa6a1f682890305c900ee11d218b36a5b9948 languageName: node linkType: hard @@ -5817,7 +5816,7 @@ __metadata: languageName: node linkType: hard -"b4a@npm:^1.0.1, b4a@npm:^1.1.0, b4a@npm:^1.5.3, b4a@npm:^1.6.0, b4a@npm:^1.6.3": +"b4a@npm:^1.0.1, b4a@npm:^1.1.0, b4a@npm:^1.5.3, b4a@npm:^1.6.0": version: 1.6.3 resolution: "b4a@npm:1.6.3" checksum: 9038fce3688b3b2d6965be32123623e6bdbd62e07d1dad3bdf063500d03ccd7583fcb8fe21603f08f92c9bb175ae8d2ae0f85643cbfbd5cb4222fcea31b252d5 @@ -6318,7 +6317,7 @@ __metadata: "@synonymdev/react-native-lnurl": 0.0.10 "@synonymdev/result": 0.0.2 "@synonymdev/slashtags-keychain": 1.0.0 - "@synonymdev/slashtags-profile": 1.0.2 + "@synonymdev/slashtags-profile": 2.0.0 "@synonymdev/slashtags-url": 1.0.1 "@synonymdev/slashtags-widget-bitcoin-feed": 1.0.0 "@synonymdev/slashtags-widget-facts-feed": 1.1.0 From 9ea7fc1138c25e467bd6b96212a781a05094b79d Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Mon, 29 Jul 2024 13:00:55 +0300 Subject: [PATCH 2/5] fix: bump @synonymdev/feeds to fix b4a.toString issue --- package.json | 2 +- yarn.lock | 23 +++++++---------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index ab2466eeb..fd9b2d699 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@shopify/react-native-skia": "1.2.1", "@synonymdev/blocktank-client": "0.0.50", "@synonymdev/blocktank-lsp-http-client": "1.1.2", - "@synonymdev/feeds": "2.1.1", + "@synonymdev/feeds": "3.0.0", "@synonymdev/ledger": "0.0.5", "@synonymdev/react-native-ldk": "0.0.148", "@synonymdev/react-native-lnurl": "0.0.10", diff --git a/yarn.lock b/yarn.lock index a51a10f86..1e914cd73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4626,21 +4626,12 @@ __metadata: languageName: node linkType: hard -"@synonymdev/feeds@npm:2.1.1": - version: 2.1.1 - resolution: "@synonymdev/feeds@npm:2.1.1" - dependencies: - b4a: ^1.5.3 - checksum: 8f09b7cb2b5bd8156f585a5601e88ecaaae41daa3a1f31595da31596df70ca6ab5f1df4b787f37a7240c3dc5a6bb213791dcc2b07ec89709875d16e96dced6f0 - languageName: node - linkType: hard - -"@synonymdev/feeds@npm:^2.0.0, @synonymdev/feeds@npm:^2.1.0": - version: 2.1.0 - resolution: "@synonymdev/feeds@npm:2.1.0" +"@synonymdev/feeds@npm:3.0.0, @synonymdev/feeds@npm:^2.0.0, @synonymdev/feeds@npm:^2.1.0": + version: 3.0.0 + resolution: "@synonymdev/feeds@npm:3.0.0" dependencies: - b4a: ^1.5.3 - checksum: f34e80b1ea64c7e58767a85d2d055ccbc8cf6e62538aff008a73c58eddaf7042383b0e14ebfba8f27fb395ccdf1787b5a534d167eb91ac5b36d6287b49a9a934 + "@synonymdev/slashtags-url": ^1.0.1 + checksum: a5c4cf3b8c70df31b35acce5cac2823ef13629675d3e1c416319079c905ce7c02dbc7e473bcc8f78a7ddbaf9de346191af50614161e555cd590e56c3d2ff6e63 languageName: node linkType: hard @@ -4720,7 +4711,7 @@ __metadata: languageName: node linkType: hard -"@synonymdev/slashtags-url@npm:1.0.1": +"@synonymdev/slashtags-url@npm:1.0.1, @synonymdev/slashtags-url@npm:^1.0.1": version: 1.0.1 resolution: "@synonymdev/slashtags-url@npm:1.0.1" dependencies: @@ -6311,7 +6302,7 @@ __metadata: "@shopify/react-native-skia": 1.2.1 "@synonymdev/blocktank-client": 0.0.50 "@synonymdev/blocktank-lsp-http-client": 1.1.2 - "@synonymdev/feeds": 2.1.1 + "@synonymdev/feeds": 3.0.0 "@synonymdev/ledger": 0.0.5 "@synonymdev/react-native-ldk": 0.0.148 "@synonymdev/react-native-lnurl": 0.0.10 From 4a98f251b85999e7911e83422a7880be5801cf32 Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Mon, 29 Jul 2024 14:36:46 +0300 Subject: [PATCH 3/5] fix: remove address from Activity Detail screen --- src/screens/Activity/ActivityDetail.tsx | 30 ++++++++----------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/src/screens/Activity/ActivityDetail.tsx b/src/screens/Activity/ActivityDetail.tsx index 963c6f52b..a162ffdde 100644 --- a/src/screens/Activity/ActivityDetail.tsx +++ b/src/screens/Activity/ActivityDetail.tsx @@ -144,7 +144,6 @@ const OnchainActivityDetail = ({ confirmTimestamp, isTransfer, isBoosted, - address, exists, } = item; @@ -582,15 +581,6 @@ const OnchainActivityDetail = ({ value={{txId}} /> - onCopy(address)}> -
{address}} - /> - {txDetails ? ( <> @@ -990,17 +980,15 @@ const LightningActivityDetail = ({ value={{id}} /> - {address && ( - onCopy(address)}> -
{address}} - /> - - )} + onCopy(address)}> +
{address}} + /> + )} From 3d37b47fde2736ae729e956d9540dedf18da8e7a Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Tue, 30 Jul 2024 15:33:45 +0200 Subject: [PATCH 4/5] fix(activity): transfer boost (#2110) --- src/screens/Wallets/BoostPrompt.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/screens/Wallets/BoostPrompt.tsx b/src/screens/Wallets/BoostPrompt.tsx index dff2d71a1..c678e043a 100644 --- a/src/screens/Wallets/BoostPrompt.tsx +++ b/src/screens/Wallets/BoostPrompt.tsx @@ -56,7 +56,10 @@ const BoostForm = ({ const [preparing, setPreparing] = useState(true); const [loading, setLoading] = useState(false); const [showCustom, setShowCustom] = useState(false); - const boostData = useMemo(() => canBoost(activityItem.id), [activityItem.id]); + const boostData = useMemo( + () => canBoost(activityItem.txId), + [activityItem.txId], + ); const activityItemFee = activityItem.fee; const recommendedFee = feeEstimates.fast; @@ -77,7 +80,7 @@ const BoostForm = ({ const res = await setupBoost({ selectedWallet, selectedNetwork, - txid: activityItem.id, + txid: activityItem.txId, }); setPreparing(false); @@ -90,7 +93,7 @@ const BoostForm = ({ return (): void => { resetSendTransaction(); }; - }, [activityItem.id, selectedNetwork, selectedWallet, dispatch]); + }, [activityItem.txId, selectedNetwork, selectedWallet, dispatch]); // Set fee to recommended value useEffect(() => { From 033edb4a46ff8d407baa25587cd5d86f6fc9c6c3 Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Tue, 30 Jul 2024 17:50:01 +0200 Subject: [PATCH 5/5] fix(activity): transfer amount & fees (#2112) --- src/utils/wallet/transfer.ts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/utils/wallet/transfer.ts b/src/utils/wallet/transfer.ts index 73e7ba813..73d18a188 100644 --- a/src/utils/wallet/transfer.ts +++ b/src/utils/wallet/transfer.ts @@ -14,22 +14,19 @@ export const getTransferForTx = async ( const { currentWallet, selectedNetwork } = getCurrentWallet(); const transfers = currentWallet.transfers[selectedNetwork]; - const transfer = transfers.find((t) => { - // check if the tx is a transfer to spending - const isTransferToSpending = t.txId === tx.txid; - if (isTransferToSpending) { - return true; - } + // check if the tx is a transfer to spending + const transferToSpending = transfers.find((t) => t.txId === tx.txid); + if (transferToSpending) { + return transferToSpending; + } - // if the funding tx is in the transfer list it's a mutual close + // if the funding tx is in the transfer list it's a mutual close + const transferToSavings = transfers.find((t) => { const txInput = tx.vin.find((vin) => t.txId === vin.txid); - if (txInput) { - return true; - } + return !!txInput; }); - - if (transfer) { - return transfer; + if (transferToSavings) { + return transferToSavings; } // If we haven't found a transfer yet, check if the tx is a sweep from a force close