more type fixes
This commit is contained in:
parent
9d9ed7a3dd
commit
325778da4d
@ -14,7 +14,7 @@ const Tokens: { [key in NetworkEnum]: { [key in TokenEnum]: `0x${string}` } } =
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getTokenByAddress = (address: string) => {
|
export const getTokenByAddress = (address: `0x${string}`) => {
|
||||||
const user = useUser();
|
const user = useUser();
|
||||||
const networksTokens = Tokens[user.networkName.value];
|
const networksTokens = Tokens[user.networkName.value];
|
||||||
for (const [token, tokenAddress] of Object.entries(networksTokens)) {
|
for (const [token, tokenAddress] of Object.entries(networksTokens)) {
|
||||||
|
|||||||
@ -409,7 +409,7 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
input[type="number"] {
|
input[type="number"] {
|
||||||
-moz-appearance: textfield;
|
appearance: textfield;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="number"]::-webkit-inner-spin-button,
|
input[type="number"]::-webkit-inner-spin-button,
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
|
import { LockStatus } from "@/blockchain/events"
|
||||||
|
|
||||||
export type WalletTransaction = {
|
export type WalletTransaction = {
|
||||||
token: string;
|
token: `0x${string}`;
|
||||||
blockNumber: number;
|
blockNumber: number;
|
||||||
amount: number;
|
amount: number;
|
||||||
seller: string;
|
seller: string;
|
||||||
buyer: string;
|
buyer: string;
|
||||||
event: string;
|
event: string;
|
||||||
lockStatus: number;
|
lockStatus: LockStatus;
|
||||||
transactionHash: string;
|
transactionHash: string;
|
||||||
transactionID?: string;
|
transactionID?: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,47 +3,47 @@ import type { WalletTransaction } from "../WalletTransaction";
|
|||||||
export const MockWalletTransactions: WalletTransaction[] = [
|
export const MockWalletTransactions: WalletTransaction[] = [
|
||||||
{
|
{
|
||||||
blockNumber: 1,
|
blockNumber: 1,
|
||||||
token: "1",
|
token: "0x1",
|
||||||
amount: 70,
|
amount: 70,
|
||||||
seller: "mockedSellerAddress",
|
seller: "0xmockedSellerAddress",
|
||||||
buyer: "mockedBuyerAddress",
|
buyer: "0xmockedBuyerAddress",
|
||||||
event: "Deposit",
|
event: "Deposit",
|
||||||
lockStatus: 0,
|
lockStatus: 0,
|
||||||
transactionHash: "1",
|
transactionHash: "1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
blockNumber: 2,
|
blockNumber: 2,
|
||||||
token: "2",
|
token: "0x2",
|
||||||
amount: 200,
|
amount: 200,
|
||||||
seller: "mockedSellerAddress",
|
seller: "0xmockedSellerAddress",
|
||||||
buyer: "mockedBuyerAddress",
|
buyer: "0xmockedBuyerAddress",
|
||||||
event: "Lock",
|
event: "Lock",
|
||||||
lockStatus: 1,
|
lockStatus: 1,
|
||||||
transactionHash: "2",
|
transactionHash: "2",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
blockNumber: 3,
|
blockNumber: 3,
|
||||||
token: "3",
|
token: "0x3",
|
||||||
amount: 1250,
|
amount: 1250,
|
||||||
seller: "mockedSellerAddress",
|
seller: "0xmockedSellerAddress",
|
||||||
buyer: "mockedBuyerAddress",
|
buyer: "0xmockedBuyerAddress",
|
||||||
event: "Release",
|
event: "Release",
|
||||||
lockStatus: 2,
|
lockStatus: 2,
|
||||||
transactionHash: "3",
|
transactionHash: "3",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
blockNumber: 4,
|
blockNumber: 4,
|
||||||
token: "4",
|
token: "0x4",
|
||||||
amount: 4000,
|
amount: 4000,
|
||||||
seller: "mockedSellerAddress",
|
seller: "0xmockedSellerAddress",
|
||||||
buyer: "mockedBuyerAddress",
|
buyer: "0xmockedBuyerAddress",
|
||||||
event: "Deposit",
|
event: "Deposit",
|
||||||
lockStatus: 0,
|
lockStatus: 0,
|
||||||
transactionHash: "4",
|
transactionHash: "4",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
blockNumber: 5,
|
blockNumber: 5,
|
||||||
token: "5",
|
token: "0x5",
|
||||||
amount: 2000,
|
amount: 2000,
|
||||||
seller: "mockedSellerAddress",
|
seller: "mockedSellerAddress",
|
||||||
buyer: "mockedBuyerAddress",
|
buyer: "mockedBuyerAddress",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user