-
Notifications
You must be signed in to change notification settings - Fork 10
/
types.ts
54 lines (48 loc) · 1.26 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { BatchInterruptedEvent, BlockchainEvents, ExtrinsicFailedEvent, ItemFailedEvent } from "../events"
import { BlockInfo } from "./utils"
export interface IFormatBalanceOptions {
/**
* @description The number of decimals.
*/
decimals?: number
/**
* @description Format the number with this specific unit.
*/
forceUnit?: string
/**
* @description Format with SI, i.e. m/M/etc.
*/
withSi?: boolean
/**
* @description Format with full SI, i.e. mili/Mega/etc.
*/
withSiFull?: boolean
/**
* @description Add the unit (useful in Balance formats).
*/
withUnit?: boolean | string
/**
* @description Token Unit.
*/
unit?: string
}
export type SubmitTxBlockingType = {
blockInfo: BlockInfo
events: BlockchainEvents
txHash: `0x${string}`
}
export type TransactionHashType = `0x${string}`
export type CheckTransactionType = {
isTxSuccess: boolean
events?: BlockchainEvents
failedEvent?: ExtrinsicFailedEvent
}
export interface ICheckBatch extends CheckTransactionType {
isBatchInterrupted: boolean
indexInterrupted?: number
batchInterruptedEvent?: BatchInterruptedEvent
}
export interface ICheckForceBatch extends CheckTransactionType {
isBatchCompleteWithoutErrors?: boolean
failedItems?: ItemFailedEvent[]
}