fix ts and es errors

This commit is contained in:
fmtabbara
2022-03-10 19:14:00 +00:00
parent bcd5531f40
commit 3c476560d2
15 changed files with 75 additions and 30 deletions
@@ -22,7 +22,7 @@ export const validationSchema = Yup.object().shape({
profitMarginPercent: Yup.number().required('Profit Percentage is required').min(0).max(100),
amount: Yup.string()
.required('An amount is required')
.test('valid-amount', 'Pledge error', async (value) => {
.test('valid-amount', 'Pledge error', async function (value) {
const isValid = await validateAmount(value || '', '100000000');
if (!isValid) {
+6 -2
View File
@@ -1,3 +1,7 @@
import type { Denom } from "./denom";
import type { Denom } from './denom';
export interface Account { contract_address: string, client_address: string, denom: Denom, }
export interface Account {
contract_address: string;
client_address: string;
denom: Denom;
}
+5 -2
View File
@@ -1,3 +1,6 @@
import type { Coin } from "./coin";
import type { Coin } from './coin';
export interface Balance { coin: Coin, printable_balance: string, }
export interface Balance {
coin: Coin;
printable_balance: string;
}
+5 -2
View File
@@ -1,3 +1,6 @@
import type { Denom } from "./denom";
import type { Denom } from './denom';
export interface Coin { amount: string, denom: Denom, }
export interface Coin {
amount: string;
denom: Denom;
}
+5 -2
View File
@@ -1,3 +1,6 @@
import type { Account } from "./account";
import type { Account } from './account';
export interface CreatedAccount { account: Account, mnemonic: string, }
export interface CreatedAccount {
account: Account;
mnemonic: string;
}
@@ -1,3 +1,7 @@
import type { Coin } from "./coin";
import type { Coin } from './coin';
export interface DelegationResult { source_address: string, target_address: string, amount: Coin | null, }
export interface DelegationResult {
source_address: string;
target_address: string;
amount: Coin | null;
}
+1 -2
View File
@@ -1,2 +1 @@
export type Denom = "Major" | "Minor";
export type Denom = 'Major' | 'Minor';
+1 -2
View File
@@ -1,2 +1 @@
export type Network = "QA" | "SANDBOX" | "MAINNET";
export type Network = 'QA' | 'SANDBOX' | 'MAINNET';
@@ -1,3 +1,7 @@
import type { Coin } from "./coin";
import type { Coin } from './coin';
export interface OriginalVestingResponse { amount: Coin, number_of_periods: number, period_duration: bigint, }
export interface OriginalVestingResponse {
amount: Coin;
number_of_periods: number;
period_duration: bigint;
}
+5 -2
View File
@@ -1,3 +1,6 @@
import type { Coin } from "./coin";
import type { Coin } from './coin';
export interface PledgeData { amount: Coin, block_time: bigint, }
export interface PledgeData {
amount: Coin;
block_time: bigint;
}
+6 -2
View File
@@ -1,2 +1,6 @@
export interface TauriContractStateParams { minimum_mixnode_pledge: string, minimum_gateway_pledge: string, mixnode_rewarded_set_size: number, mixnode_active_set_size: number, }
export interface TauriContractStateParams {
minimum_mixnode_pledge: string;
minimum_gateway_pledge: string;
mixnode_rewarded_set_size: number;
mixnode_active_set_size: number;
}
+9 -2
View File
@@ -1,3 +1,10 @@
import type { TransactionDetails } from "./transactiondetails";
import type { TransactionDetails } from './transactiondetails';
export interface TauriTxResult { block_height: bigint, code: number, details: TransactionDetails, gas_used: bigint, gas_wanted: bigint, tx_hash: string, }
export interface TauriTxResult {
block_height: bigint;
code: number;
details: TransactionDetails;
gas_used: bigint;
gas_wanted: bigint;
tx_hash: string;
}
@@ -1,3 +1,7 @@
import type { Coin } from "./coin";
import type { Coin } from './coin';
export interface TransactionDetails { amount: Coin, from_address: string, to_address: string, }
export interface TransactionDetails {
amount: Coin;
from_address: string;
to_address: string;
}
@@ -1,4 +1,10 @@
import type { Coin } from "./coin";
import type { VestingPeriod } from "./vestingperiod";
import type { Coin } from './coin';
import type { VestingPeriod } from './vestingperiod';
export interface VestingAccountInfo { owner_address: string, staking_address: string | null, start_time: bigint, periods: Array<VestingPeriod>, coin: Coin, }
export interface VestingAccountInfo {
owner_address: string;
staking_address: string | null;
start_time: bigint;
periods: Array<VestingPeriod>;
coin: Coin;
}
+4 -2
View File
@@ -1,2 +1,4 @@
export interface VestingPeriod { start_time: bigint, period_seconds: bigint, }
export interface VestingPeriod {
start_time: bigint;
period_seconds: bigint;
}