Skip to content
Closed
46 changes: 46 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: ["stable"]
pull_request:
branches: ["main", "stable"]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
run: npm install -g pnpm

- name: Verify pnpm installation
run: pnpm --version

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build
13 changes: 7 additions & 6 deletions app/components/TransferForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export const TransferForm: React.FC<{
const { token, amount, recipientNetwork, recipientNetworkImageUrl } = watch();

// Get the Network object for the selected recipient network
const transferNetwork = networks.find(n => n.chain.name === recipientNetwork) || selectedNetwork;
const transferNetwork =
networks.find((n) => n.chain.name === recipientNetwork) || selectedNetwork;

const fetchedTokens: Token[] = allTokens[transferNetwork.chain.name] || [];
const tokens = fetchedTokens.map((token) => ({
Expand All @@ -93,9 +94,7 @@ export const TransferForm: React.FC<{
const recipientNetworks = networks
.filter((network) => {
if (useInjectedWallet) return true;
return (
network.chain.name !== "Celo"
);
return network.chain.name !== "Celo";
})
.map((network) => ({
name: network.chain.name,
Expand All @@ -112,7 +111,7 @@ export const TransferForm: React.FC<{
error,
} = useSmartWalletTransfer({
client: client ?? null,
selectedNetwork: transferNetwork, // Use the recipient's network, not global
selectedNetwork: transferNetwork, // Use the recipient's network, not global
user,
supportedTokens: fetchedTokens,
getAccessToken,
Expand Down Expand Up @@ -412,7 +411,9 @@ export const TransferForm: React.FC<{
: "text-gray-400 dark:text-white/30"
}`}
>
<img
<Image
height={50}
width={50}
src={recipientNetworkImageUrl}
alt={recipientNetwork}
className="h-6 w-6 rounded-full"
Expand Down
Loading