fix(pay): allow topping up from a different wallet with the same currency (#4602)
Fixes CNCT-1835
<!-- start pr-codex -->
---
## PR-Codex overview
This PR allows topping up from a different wallet with the same currency.
### Detailed summary
- Enable topping up from a different wallet with the same currency
- Rename "Seller" to "Receiver" in ConfirmationScreen
- Modify condition in showSwapFlow to include "fund_wallet" mode
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"thirdweb": patch
|
||||
---
|
||||
|
||||
Allow topping up from a different wallet with the same currency
|
||||
@@ -1120,7 +1120,8 @@ function SwapScreenContent(props: {
|
||||
|
||||
function showSwapFlow() {
|
||||
if (
|
||||
props.payOptions.mode === "direct_payment" &&
|
||||
(props.payOptions.mode === "direct_payment" ||
|
||||
props.payOptions.mode === "fund_wallet") &&
|
||||
!isNotEnoughBalance &&
|
||||
!swapRequired
|
||||
) {
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ export function SwapConfirmationScreen(props: {
|
||||
|
||||
{/* Send to */}
|
||||
{isDifferentRecipient && (
|
||||
<ConfirmItem label="Seller">
|
||||
<ConfirmItem label="Receiver">
|
||||
<Text color="primaryText" size="sm">
|
||||
{ensName.data || shortenAddress(receiver)}
|
||||
</Text>
|
||||
|
||||
@@ -23,8 +23,6 @@ export function usePayerSetup() {
|
||||
const account = wallet.getAccount();
|
||||
const chain = wallet.getChain();
|
||||
if (account && chain) {
|
||||
console.log("updated to", account, chain);
|
||||
|
||||
setPayer({
|
||||
account,
|
||||
chain,
|
||||
|
||||
Reference in New Issue
Block a user