Compare commits
2 Commits
245f12e190
...
a24ee193d4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a24ee193d4 | ||
|
|
9b325ac917 |
@ -39,7 +39,7 @@ export const getP2PixAddress = (network?: NetworkEnum): Address => {
|
||||
const user = useUser();
|
||||
const possibleP2PixAddresses: { [key in NetworkEnum]: Address } = {
|
||||
[NetworkEnum.sepolia]: "0xb7cD135F5eFD9760981e02E2a898790b688939fe",
|
||||
[NetworkEnum.rootstock]: "0x98ba35eb14b38D6Aa709338283af3e922476dE34",
|
||||
[NetworkEnum.rootstock]: "0x57Dcba05980761169508886eEdc6f5E7EC0411Dc",
|
||||
};
|
||||
|
||||
return possibleP2PixAddresses[
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { formatEther, hexToString, type Address } from "viem";
|
||||
import { formatEther, type Address } from "viem";
|
||||
import { useUser } from "@/composables/useUser";
|
||||
|
||||
import { getPublicClient, getWalletClient, getContract } from "./provider";
|
||||
@ -463,18 +463,3 @@ export const getActiveLockAmount = async (
|
||||
return total;
|
||||
}, 0);
|
||||
};
|
||||
|
||||
export const getSellerParticipantId = async (
|
||||
sellerAddress: Address,
|
||||
tokenAddress: Address
|
||||
): Promise<string> => {
|
||||
const { address, abi, client } = await getContract();
|
||||
|
||||
const participantId = await client.readContract({
|
||||
address,
|
||||
abi,
|
||||
functionName: "getPixTarget",
|
||||
args: [sellerAddress, tokenAddress],
|
||||
});
|
||||
return hexToString(participantId);
|
||||
};
|
||||
|
||||
@ -4,7 +4,7 @@ import CustomButton from "@/components/CustomButton/CustomButton.vue";
|
||||
import CustomModal from "@/components//CustomModal/CustomModal.vue";
|
||||
import SpinnerComponent from "@/components/SpinnerComponent.vue";
|
||||
import { createSolicitation, getSolicitation, type Offer } from "@/utils/bbPay";
|
||||
import { getSellerParticipantId } from "@/blockchain/wallet";
|
||||
import { getParticipantID } from "@/blockchain/events";
|
||||
import { getUnreleasedLockById } from "@/blockchain/events";
|
||||
import QRCode from "qrcode";
|
||||
|
||||
@ -86,7 +86,7 @@ onMounted(async () => {
|
||||
BigInt(props.lockID)
|
||||
);
|
||||
|
||||
const participantId = await getSellerParticipantId(
|
||||
const participantId = await getParticipantID(
|
||||
sellerAddress,
|
||||
tokenAddress
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user