Skip to content

Commit

Permalink
Merge branch 'master' into release-v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasonvdb committed Aug 1, 2024
2 parents d8f96e7 + 033edb4 commit 0b8447c
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 62 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
"@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",
"@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",
Expand Down
30 changes: 9 additions & 21 deletions src/screens/Activity/ActivityDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ const OnchainActivityDetail = ({
confirmTimestamp,
isTransfer,
isBoosted,
address,
exists,
} = item;

Expand Down Expand Up @@ -582,15 +581,6 @@ const OnchainActivityDetail = ({
value={<BodySSB>{txId}</BodySSB>}
/>
</TouchableOpacity>
<TouchableOpacity
style={styles.sectionContainer}
activeOpacity={0.7}
onPress={(): void => onCopy(address)}>
<Section
title={t('activity_address')}
value={<BodySSB>{address}</BodySSB>}
/>
</TouchableOpacity>
{txDetails ? (
<>
<View style={styles.sectionContainer}>
Expand Down Expand Up @@ -990,17 +980,15 @@ const LightningActivityDetail = ({
value={<BodySSB>{id}</BodySSB>}
/>
</TouchableOpacity>
{address && (
<TouchableOpacity
style={styles.sectionContainer}
activeOpacity={0.7}
onPress={(): void => onCopy(address)}>
<Section
title={t('activity_invoice')}
value={<BodySSB>{address}</BodySSB>}
/>
</TouchableOpacity>
)}
<TouchableOpacity
style={styles.sectionContainer}
activeOpacity={0.7}
onPress={(): void => onCopy(address)}>
<Section
title={t('activity_invoice')}
value={<BodySSB>{address}</BodySSB>}
/>
</TouchableOpacity>
</>
)}
</>
Expand Down
9 changes: 6 additions & 3 deletions src/screens/Wallets/BoostPrompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -77,7 +80,7 @@ const BoostForm = ({
const res = await setupBoost({
selectedWallet,
selectedNetwork,
txid: activityItem.id,
txid: activityItem.txId,
});
setPreparing(false);

Expand All @@ -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(() => {
Expand Down
23 changes: 10 additions & 13 deletions src/utils/wallet/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 13 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -4710,18 +4701,17 @@ __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

"@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:
Expand Down Expand Up @@ -5817,7 +5807,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
Expand Down Expand Up @@ -6312,13 +6302,13 @@ __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
"@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
Expand Down

0 comments on commit 0b8447c

Please sign in to comment.