Skip to content

Commit

Permalink
🩹 debit2credit: use bridged USDC by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sebipap committed Apr 23, 2024
1 parent 766fd1c commit dbdc9c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions components/Credit/Borrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ const Borrow = ({ onDeposit, direct, receiver, depositConfig, onNextStep }: Prop
const { setSymbol, setQty, setReceiver, setOperation, symbol, tx } = useOperationContext();
const { route } = useSocketSwap();

const { marketAccount } = useAccountData('USDC');
const { marketAccount } = useAccountData('USDC.e');
const { t } = useTranslation();
const { chain } = useWeb3();

useEffect(() => {
setOperation('borrowAtMaturity');
setSymbol('USDC');
setSymbol('USDC.e');
if (!marketAccount) return;
if (direct && receiver) setReceiver(receiver);
}, [chain.id, marketAccount, receiver, setQty, setReceiver, setSymbol, direct, setOperation]);
Expand Down Expand Up @@ -65,7 +65,7 @@ const Borrow = ({ onDeposit, direct, receiver, depositConfig, onNextStep }: Prop
message={t(
'This borrowing process will include a token swap from {{from}} to {{to}}; you will find the swap details below.',
{
from: symbol === 'USDC' ? 'USDC.e' : symbol,
from: symbol,
to: depositConfig.tokenSymbol,
},
)}
Expand Down
2 changes: 1 addition & 1 deletion components/Credit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ const CreditWrapper = () => {
<OperationContextProvider
args={{
operation: 'borrowAtMaturity',
symbol: 'USDC',
symbol: 'USDC.e',
}}
>
<Credit />
Expand Down

0 comments on commit dbdc9c9

Please sign in to comment.