mirror of
https://github.com/apotdevin/thunderhub.git
synced 2024-11-19 18:00:05 +01:00
fix: ๐ chain balance type
This commit is contained in:
parent
34da8a3bc0
commit
603dcacd02
@ -3,7 +3,7 @@
|
|||||||
exports[`Chain Resolvers getChainBalance 1`] = `
|
exports[`Chain Resolvers getChainBalance 1`] = `
|
||||||
Object {
|
Object {
|
||||||
"data": Object {
|
"data": Object {
|
||||||
"getChainBalance": 1000000,
|
"getChainBalance": "1000000",
|
||||||
},
|
},
|
||||||
"errors": undefined,
|
"errors": undefined,
|
||||||
"extensions": undefined,
|
"extensions": undefined,
|
||||||
@ -18,7 +18,7 @@ Object {
|
|||||||
exports[`Chain Resolvers getPendingChainBalance 1`] = `
|
exports[`Chain Resolvers getPendingChainBalance 1`] = `
|
||||||
Object {
|
Object {
|
||||||
"data": Object {
|
"data": Object {
|
||||||
"getPendingChainBalance": 1000000,
|
"getPendingChainBalance": "1000000",
|
||||||
},
|
},
|
||||||
"errors": undefined,
|
"errors": undefined,
|
||||||
"extensions": undefined,
|
"extensions": undefined,
|
||||||
|
@ -44,7 +44,7 @@ export const chainResolvers = {
|
|||||||
lnd,
|
lnd,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return value.chain_balance;
|
return value.chain_balance || 0;
|
||||||
},
|
},
|
||||||
getPendingChainBalance: async (
|
getPendingChainBalance: async (
|
||||||
_: undefined,
|
_: undefined,
|
||||||
@ -60,7 +60,7 @@ export const chainResolvers = {
|
|||||||
lnd,
|
lnd,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return pendingValue.pending_chain_balance;
|
return pendingValue.pending_chain_balance || 0;
|
||||||
},
|
},
|
||||||
getChainTransactions: async (
|
getChainTransactions: async (
|
||||||
_: undefined,
|
_: undefined,
|
||||||
|
@ -79,8 +79,8 @@ export const queryTypes = gql`
|
|||||||
getPeers: [peerType]
|
getPeers: [peerType]
|
||||||
signMessage(message: String!): String
|
signMessage(message: String!): String
|
||||||
verifyMessage(message: String!, signature: String!): String
|
verifyMessage(message: String!, signature: String!): String
|
||||||
getChainBalance: Int
|
getChainBalance: String!
|
||||||
getPendingChainBalance: Int
|
getPendingChainBalance: String!
|
||||||
getChainTransactions: [getTransactionsType]
|
getChainTransactions: [getTransactionsType]
|
||||||
getUtxos: [getUtxosType]
|
getUtxos: [getUtxosType]
|
||||||
getMessages(
|
getMessages(
|
||||||
|
@ -7,7 +7,7 @@ export type BosPayMutationVariables = Types.Exact<{
|
|||||||
max_fee: Types.Scalars['Int'];
|
max_fee: Types.Scalars['Int'];
|
||||||
max_paths: Types.Scalars['Int'];
|
max_paths: Types.Scalars['Int'];
|
||||||
message?: Types.Maybe<Types.Scalars['String']>;
|
message?: Types.Maybe<Types.Scalars['String']>;
|
||||||
out?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>>>;
|
out?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>> | Types.Maybe<Types.Scalars['String']>>;
|
||||||
request: Types.Scalars['String'];
|
request: Types.Scalars['String'];
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import * as Types from '../../types';
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
import * as Apollo from '@apollo/client';
|
import * as Apollo from '@apollo/client';
|
||||||
export type BosRebalanceMutationVariables = Types.Exact<{
|
export type BosRebalanceMutationVariables = Types.Exact<{
|
||||||
avoid?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>>>;
|
avoid?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>> | Types.Maybe<Types.Scalars['String']>>;
|
||||||
in_through?: Types.Maybe<Types.Scalars['String']>;
|
in_through?: Types.Maybe<Types.Scalars['String']>;
|
||||||
is_avoiding_high_inbound?: Types.Maybe<Types.Scalars['Boolean']>;
|
is_avoiding_high_inbound?: Types.Maybe<Types.Scalars['Boolean']>;
|
||||||
max_fee?: Types.Maybe<Types.Scalars['Int']>;
|
max_fee?: Types.Maybe<Types.Scalars['Int']>;
|
||||||
|
@ -6,7 +6,7 @@ import * as Apollo from '@apollo/client';
|
|||||||
export type CreateThunderPointsMutationVariables = Types.Exact<{
|
export type CreateThunderPointsMutationVariables = Types.Exact<{
|
||||||
id: Types.Scalars['String'];
|
id: Types.Scalars['String'];
|
||||||
alias: Types.Scalars['String'];
|
alias: Types.Scalars['String'];
|
||||||
uris: Array<Types.Scalars['String']>;
|
uris: Array<Types.Scalars['String']> | Types.Scalars['String'];
|
||||||
public_key: Types.Scalars['String'];
|
public_key: Types.Scalars['String'];
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import * as Types from '../../types';
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
import * as Apollo from '@apollo/client';
|
import * as Apollo from '@apollo/client';
|
||||||
export type UpdateMultipleFeesMutationVariables = Types.Exact<{
|
export type UpdateMultipleFeesMutationVariables = Types.Exact<{
|
||||||
channels: Array<Types.ChannelDetailInput>;
|
channels: Array<Types.ChannelDetailInput> | Types.ChannelDetailInput;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import * as Types from '../../types';
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
import * as Apollo from '@apollo/client';
|
import * as Apollo from '@apollo/client';
|
||||||
export type GetBoltzSwapStatusQueryVariables = Types.Exact<{
|
export type GetBoltzSwapStatusQueryVariables = Types.Exact<{
|
||||||
ids: Array<Types.Maybe<Types.Scalars['String']>>;
|
ids: Array<Types.Maybe<Types.Scalars['String']>> | Types.Maybe<Types.Scalars['String']>;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
|
@ -752,7 +752,7 @@ Object {
|
|||||||
exports[`Query tests "GET_NODE_INFO" matches snapshot 1`] = `
|
exports[`Query tests "GET_NODE_INFO" matches snapshot 1`] = `
|
||||||
Object {
|
Object {
|
||||||
"data": Object {
|
"data": Object {
|
||||||
"getChainBalance": 1000000,
|
"getChainBalance": "1000000",
|
||||||
"getChannelBalance": Object {
|
"getChannelBalance": Object {
|
||||||
"confirmedBalance": 1000000,
|
"confirmedBalance": 1000000,
|
||||||
"pendingBalance": 50000,
|
"pendingBalance": 50000,
|
||||||
@ -771,7 +771,7 @@ Object {
|
|||||||
"pending_channels_count": 2,
|
"pending_channels_count": 2,
|
||||||
"version": "version",
|
"version": "version",
|
||||||
},
|
},
|
||||||
"getPendingChainBalance": 1000000,
|
"getPendingChainBalance": "1000000",
|
||||||
},
|
},
|
||||||
"errors": undefined,
|
"errors": undefined,
|
||||||
"extensions": undefined,
|
"extensions": undefined,
|
||||||
|
@ -83,8 +83,8 @@ export type Query = {
|
|||||||
getPeers?: Maybe<Array<Maybe<PeerType>>>;
|
getPeers?: Maybe<Array<Maybe<PeerType>>>;
|
||||||
signMessage?: Maybe<Scalars['String']>;
|
signMessage?: Maybe<Scalars['String']>;
|
||||||
verifyMessage?: Maybe<Scalars['String']>;
|
verifyMessage?: Maybe<Scalars['String']>;
|
||||||
getChainBalance?: Maybe<Scalars['Int']>;
|
getChainBalance: Scalars['String'];
|
||||||
getPendingChainBalance?: Maybe<Scalars['Int']>;
|
getPendingChainBalance: Scalars['String'];
|
||||||
getChainTransactions?: Maybe<Array<Maybe<GetTransactionsType>>>;
|
getChainTransactions?: Maybe<Array<Maybe<GetTransactionsType>>>;
|
||||||
getUtxos?: Maybe<Array<Maybe<GetUtxosType>>>;
|
getUtxos?: Maybe<Array<Maybe<GetUtxosType>>>;
|
||||||
getMessages?: Maybe<GetMessagesType>;
|
getMessages?: Maybe<GetMessagesType>;
|
||||||
|
@ -83,8 +83,8 @@ export const useNodeInfo = (): StatusState => {
|
|||||||
mayorVersion: mayor,
|
mayorVersion: mayor,
|
||||||
minorVersion: minor,
|
minorVersion: minor,
|
||||||
revision: revision,
|
revision: revision,
|
||||||
chainBalance: getChainBalance || 0,
|
chainBalance: Number(getChainBalance) || 0,
|
||||||
chainPending: getPendingChainBalance || 0,
|
chainPending: Number(getPendingChainBalance) || 0,
|
||||||
channelBalance: confirmedBalance,
|
channelBalance: confirmedBalance,
|
||||||
channelPending: pendingBalance,
|
channelPending: pendingBalance,
|
||||||
activeChannelCount: active_channels_count,
|
activeChannelCount: active_channels_count,
|
||||||
|
Loadingโฆ
Reference in New Issue
Block a user