Skip to content

Commit

Permalink
Merge 06f3552 into 30c8cba
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyi2811 authored May 13, 2022
2 parents 30c8cba + 06f3552 commit 485c951
Show file tree
Hide file tree
Showing 40 changed files with 494 additions and 604 deletions.
2 changes: 0 additions & 2 deletions apps/whale/src/module.api/address.controller.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ describe('listAccountHistory', () => {
const accountHistory = history.data[i]
expect(typeof accountHistory.owner).toStrictEqual('string')
expect(typeof accountHistory.block.height).toStrictEqual('number')
expect(typeof accountHistory.block.hash).toStrictEqual('string')
expect(typeof accountHistory.block.time).toStrictEqual('number')
expect(typeof accountHistory.type).toStrictEqual('string')
expect(typeof accountHistory.txn).toStrictEqual('number')
expect(typeof accountHistory.txid).toStrictEqual('string')
Expand Down
4 changes: 1 addition & 3 deletions apps/whale/src/module.api/address.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ function mapAddressHistory (list: AccountHistory[]): AddressHistory[] {
type: each.type,
amounts: each.amounts,
block: {
height: each.blockHeight,
hash: each.blockHash,
time: each.blockTime
height: each.blockHeight
}
}
})
Expand Down
8 changes: 4 additions & 4 deletions docs/node/CATEGORIES/08-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ enum DfTxType {
interface AccountHistory {
owner: string
blockHeight: number
blockHash: string
blockTime: number
blockHash?: string
blockTime?: number
type: string
txn: number
txid: string
Expand Down Expand Up @@ -254,8 +254,8 @@ interface account {
interface AccountHistory {
owner: string
blockHeight: number
blockHash: string
blockTime: number
blockHash?: string
blockTime?: number
type: string
txn: number
txid: string
Expand Down
14 changes: 10 additions & 4 deletions docs/node/CATEGORIES/11-masternode.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,19 @@ interface MasternodePagination {
interface MasternodeInfo {
ownerAuthAddress: string
operatorAuthAddress: string
rewardAddress: string
creationHeight: number
resignHeight: number
resignTx: string
banHeight: number
banTx: string
collateralTx: string
state: MasternodeState
mintedBlocks: number
ownerIsMine: boolean
operatorIsMine: boolean
localMasternode: boolean
targetMultiplier?: number
targetMultipliers?: number[]
timelock?: number
}

interface MasternodeResult<T> {
Expand Down Expand Up @@ -118,16 +121,19 @@ enum MasternodeState {
interface MasternodeInfo {
ownerAuthAddress: string
operatorAuthAddress: string
rewardAddress: string
creationHeight: number
resignHeight: number
resignTx: string
banHeight: number
banTx: string
collateralTx: string
state: MasternodeState
mintedBlocks: number
ownerIsMine: boolean
operatorIsMine: boolean
localMasternode: boolean
targetMultiplier?: number
targetMultipliers?: number[]
timelock?: number
}

interface MasternodeResult<T> {
Expand Down
7 changes: 1 addition & 6 deletions docs/node/CATEGORIES/16-loan.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,7 @@ List collateral tokens.

```ts title="client.loan.listCollateralTokens()"
interface loan {
listCollateralTokens (collateralToken: ListCollateralTokens = {}): Promise<CollateralTokenDetail[]>
}

interface ListCollateralTokens {
height?: number
all?: boolean
listCollateralTokens (): Promise<CollateralTokenDetail[]>
}

interface CollateralTokenDetail {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ describe('Account', () => {
expect(history.txn).toStrictEqual(referenceHistory.txn)
expect(history.txid).toStrictEqual(referenceHistory.txid)
expect(history.type).toStrictEqual(referenceHistory.type)
expect(history.blockHash).toStrictEqual(referenceHistory.blockHash)
expect(history.blockTime).toStrictEqual(referenceHistory.blockTime)
expect(history.amounts).toStrictEqual(referenceHistory.amounts)
expect(addresses.includes(history.owner)).toStrictEqual(true)
})
Expand All @@ -61,8 +59,6 @@ describe('Account', () => {
expect(history.txn).toStrictEqual(referenceHistory.txn)
expect(history.txid).toStrictEqual(referenceHistory.txid)
expect(history.type).toStrictEqual(referenceHistory.type)
expect(history.blockHash).toStrictEqual(referenceHistory.blockHash)
expect(history.blockTime).toStrictEqual(referenceHistory.blockTime)
expect(history.amounts).toStrictEqual(referenceHistory.amounts)
})

Expand Down
Loading

0 comments on commit 485c951

Please sign in to comment.