Skip to content

Commit 7bf5e0b

Browse files
committed
use mainnet
1 parent 3487c62 commit 7bf5e0b

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

frontend/app/_layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
Inter_600SemiBold,
55
} from '@expo-google-fonts/inter';
66
import { GeistMono_400Regular } from '@expo-google-fonts/geist-mono';
7-
import { PrivyProvider, baseSepolia } from '@privy-io/expo';
7+
import { PrivyProvider, base } from '@privy-io/expo';
88
import { PrivyElements } from '@privy-io/expo/ui';
99
import { SmartWalletsProvider } from '@privy-io/expo/smart-wallets';
1010
import Constants from 'expo-constants';
@@ -25,7 +25,7 @@ function AppContent() {
2525
<PrivyProvider
2626
appId={Constants.expoConfig?.extra?.privyAppId}
2727
clientId={Constants.expoConfig?.extra?.privyClientId}
28-
// supportedChains={[baseSepolia]}
28+
supportedChains={[base]}
2929
config={{
3030
embedded: {
3131
ethereum: {

frontend/components/recording/ClaimScreen.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ export default function ClaimScreen({
179179
<TouchableOpacity
180180
className={`flex flex-row justify-center items-center bg-black px-4 py-3 flex-1 rounded-full`}
181181
onPress={() => {
182-
// TODO: hardcoding for test purpose
183-
handleClaimPoints(1);
182+
handleClaimPoints(availablePoints);
184183
}}
185184
activeOpacity={0.8}
186185
>

frontend/hooks/useBaseContract.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { usePrivy } from '@privy-io/expo';
2-
import abi from '../contracts/base_abi.json';
3-
import { useSmartWallets } from '@privy-io/expo/smart-wallets';
4-
import { encodeFunctionData } from 'viem';
1+
import { usePrivy } from "@privy-io/expo";
2+
import abi from "../contracts/base_abi.json";
3+
import { useSmartWallets } from "@privy-io/expo/smart-wallets";
4+
import { encodeFunctionData } from "viem";
55

66
export function useBaseContract() {
77
const { user } = usePrivy();
@@ -11,7 +11,7 @@ export function useBaseContract() {
1111
if (
1212
user &&
1313
user.linked_accounts &&
14-
user.linked_accounts.findIndex((f) => f.type === 'smart_wallet') >= 0
14+
user.linked_accounts.findIndex((f) => f.type === "smart_wallet") >= 0
1515
) {
1616
// smart wallet
1717
if (client) {
@@ -21,29 +21,29 @@ export function useBaseContract() {
2121
// }); // base-sepolia
2222
const fndata = encodeFunctionData({
2323
abi: abi.abi,
24-
functionName: 'claimUSDC',
24+
functionName: "claimUSDC",
2525
args: [amount],
2626
});
2727
const tx = await client.sendTransaction({
2828
account: client.account,
2929
calls: [
3030
{
31-
to: '0xB8760af2a4F4Df2225894324C106d587951D00CC' as `0x${string}`,
31+
to: "0xB445f1c6FD6BD19Fe196A5894D12F46b66e5Ad29" as `0x${string}`,
3232
data: fndata,
3333
},
3434
],
3535
});
3636
return tx;
3737
} catch (error) {
38-
console.error('Error getting client or sending transaction:', error);
38+
console.error("Error getting client or sending transaction:", error);
3939
throw error;
4040
}
4141
} else {
42-
console.error('SmartWallets not available');
43-
throw new Error('SmartWallets not available');
42+
console.error("SmartWallets not available");
43+
throw new Error("SmartWallets not available");
4444
}
4545
} else {
46-
alert('Non-smart wallet not supported yet');
46+
alert("Non-smart wallet not supported yet");
4747
return null;
4848
}
4949
};

0 commit comments

Comments
 (0)