From 47d0ad6a0c90938fdfb3f69f6911af14f5166d94 Mon Sep 17 00:00:00 2001
From: JellyWang <38491708+ezailWang@users.noreply.github.com>
Date: Wed, 9 Oct 2024 09:14:40 +0800
Subject: [PATCH 1/2] fix: swap token list item more icon alignselfcenter
(#5946)
---
.../Swap/pages/modal/SwapTokenSelectModal.tsx | 76 ++++++++++---------
1 file changed, 40 insertions(+), 36 deletions(-)
diff --git a/packages/kit/src/views/Swap/pages/modal/SwapTokenSelectModal.tsx b/packages/kit/src/views/Swap/pages/modal/SwapTokenSelectModal.tsx
index 3b5adfa4380..06edcb1a721 100644
--- a/packages/kit/src/views/Swap/pages/modal/SwapTokenSelectModal.tsx
+++ b/packages/kit/src/views/Swap/pages/modal/SwapTokenSelectModal.tsx
@@ -10,7 +10,6 @@ import {
Alert,
Divider,
Empty,
- IconButton,
ListView,
Page,
SizableText,
@@ -302,43 +301,48 @@ const SwapTokenSelectPage = () => {
- }
- items={[
- {
- icon: 'Copy3Outline',
- label: intl.formatMessage({
- id: ETranslations.global_copy_token_contract,
- }),
- onPress: () => {
- copyText(rawItem.contractAddress);
+
+
+ }
+ items={[
+ {
+ icon: 'Copy3Outline',
+ label: intl.formatMessage({
+ id: ETranslations.global_copy_token_contract,
+ }),
+ onPress: () => {
+ copyText(rawItem.contractAddress);
+ },
+ disabled: rawItem.isNative,
},
- disabled: rawItem.isNative,
- },
- {
- icon: 'OpenOutline',
- label: intl.formatMessage({
- id: ETranslations.swap_token_selector_contract_info,
- }),
- onPress: async () => {
- const url =
- await backgroundApiProxy.serviceExplorer.buildExplorerUrl(
- {
- networkId: rawItem.networkId,
- type: 'token',
- param: rawItem.contractAddress,
- },
- );
- openUrlExternal(url);
+ {
+ icon: 'OpenOutline',
+ label: intl.formatMessage({
+ id: ETranslations.swap_token_selector_contract_info,
+ }),
+ onPress: async () => {
+ const url =
+ await backgroundApiProxy.serviceExplorer.buildExplorerUrl(
+ {
+ networkId: rawItem.networkId,
+ type: 'token',
+ param: rawItem.contractAddress,
+ },
+ );
+ openUrlExternal(url);
+ },
+ disabled: rawItem.isNative,
},
- disabled: rawItem.isNative,
- },
- ]}
- />
+ ]}
+ />
+
}
/>
>
From 7089f489a17bd09ded6642d9673fc3837dfbd990 Mon Sep 17 00:00:00 2001
From: weatherstar
Date: Wed, 9 Oct 2024 09:31:32 +0800
Subject: [PATCH 2/2] fix: btc staking info (#5957)
---
packages/kit-bg/src/vaults/impls/btc/Vault.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/kit-bg/src/vaults/impls/btc/Vault.ts b/packages/kit-bg/src/vaults/impls/btc/Vault.ts
index 337dda16ee3..ec3b3a328e5 100644
--- a/packages/kit-bg/src/vaults/impls/btc/Vault.ts
+++ b/packages/kit-bg/src/vaults/impls/btc/Vault.ts
@@ -128,7 +128,7 @@ export default class VaultBtc extends VaultBase {
const { swapInfo, stakingInfo } = unsignedTx;
const { inputs, outputs, inputsToSign, psbtHex } = encodedTx;
- if (psbtHex && Array.isArray(inputsToSign)) {
+ if (!swapInfo && !stakingInfo && psbtHex && Array.isArray(inputsToSign)) {
return this.buildDecodedPsbtTx(params);
}
@@ -264,6 +264,7 @@ export default class VaultBtc extends VaultBase {
action.assetTransfer.utxoFrom = utxoFrom;
action.assetTransfer.utxoTo = originalUtxoTo;
}
+ actions = [action];
} else if (nativeToken) {
actions = [
{