rootstock testnet fix

This commit is contained in:
hueso
2025-07-18 14:56:10 -03:00
parent f6a9ab854c
commit 2b707e81c2
3 changed files with 8 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import { getContract, getPublicClient, getWalletClient } from "./provider";
import { getTokenAddress, getP2PixAddress } from "./addresses";
import { parseEther, toHex } from "viem";
import { sepolia, rootstock } from "viem/chains";
import { sepolia, rootstockTestnet } from "viem/chains";
import { mockTokenAbi } from "./abi";
import { useUser } from "@/composables/useUser";
@@ -33,7 +33,7 @@ const approveTokens = async (participant: Participant): Promise<any> => {
if ( allowance < parseEther(participant.offer.toString()) ) {
// Approve tokens
const chain = user.networkId.value === sepolia.id ? sepolia : rootstock;
const chain = user.networkId.value === sepolia.id ? sepolia : rootstockTestnet;
const hash = await walletClient.writeContract({
address: tokenAddress,
abi: mockTokenAbi,
@@ -65,7 +65,7 @@ const addDeposit = async (): Promise<any> => {
if (!sellerId.id) {
throw new Error("Failed to create participant");
}
const chain = user.networkId.value === sepolia.id ? sepolia : rootstock;
const chain = user.networkId.value === sepolia.id ? sepolia : rootstockTestnet;
const hash = await walletClient.writeContract({
address,
abi,