Skip to content

Commit

Permalink
Renamed the interface WalletBalance, WalletMineBalance and WalletWatc…
Browse files Browse the repository at this point in the history
…hOnlyBalance to WalletBalances, WalletMineBalances and WalletWatchOnlyBalances respectively.
  • Loading branch information
aikchun committed Jun 11, 2021
1 parent dd5b8fd commit 2edd638
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions packages/jellyfish-api-core/src/category/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ export class Wallet {
* Returns an object with all balances
*
* @param {boolean} withTokens = false, Include tokens balances; Default is 'false' for backward compatibility.
* @return {Promise<WalletBalance>}
* @return {Promise<WalletBalances>}
*/
async getBalances (withTokens = false): Promise<WalletBalance> {
async getBalances (withTokens = false): Promise<WalletBalances> {
return await this.client.call('getbalances', [withTokens], 'bignumber')
}

Expand Down Expand Up @@ -473,19 +473,19 @@ export interface InWalletTransactionDetail {
abandoned: boolean
}

export interface WalletBalance {
mine: WalletMineBalance
watchonly?: WalletWatchOnlyBalance
export interface WalletBalances {
mine: WalletMineBalances
watchonly?: WalletWatchOnlyBalances
}

export interface WalletMineBalance {
export interface WalletMineBalances {
trusted: BigNumber
untrusted_pending: BigNumber
immature: BigNumber
used?: BigNumber
}

export interface WalletWatchOnlyBalance {
export interface WalletWatchOnlyBalances {
trusted: BigNumber
untrusted_pending: BigNumber
immature: BigNumber
Expand Down
12 changes: 6 additions & 6 deletions website/docs/jellyfish/api/wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ Returns an object with all balances.

```ts title="client.wallet.getBalances()"
interface wallet {
getBalances(withTokens = false): Promise<WalletBalance>
getBalances(withTokens = false): Promise<WalletBalances>
}

interface WalletBalance {
mine: WalletMineBalance
watchonly?: WalletWatchOnlyBalance
interface WalletBalances {
mine: WalletMineBalances
watchonly?: WalletWatchOnlyBalances
}

interface WalletMineBalance {
interface WalletMineBalances {
trusted: BigNumber
untrusted_pending: BigNumber
immature: BigNumber
used?: BigNumber
}

interface WalletWatchOnlyBalance {
interface WalletWatchOnlyBalances {
trusted: BigNumber
untrusted_pending: BigNumber
immature: BigNumber
Expand Down

0 comments on commit 2edd638

Please sign in to comment.