diff --git a/src/graphql/queries/__generated__/contacts.generated.tsx b/src/graphql/queries/__generated__/contacts.generated.tsx index bf2f98a8..b237ddc9 100644 --- a/src/graphql/queries/__generated__/contacts.generated.tsx +++ b/src/graphql/queries/__generated__/contacts.generated.tsx @@ -61,9 +61,8 @@ export type GetWalletContactQuery = { payment_options?: Array<{ __typename?: 'LnUrlCurrency'; id: string; - code: Types.PaymentOptionCode; - chain: Types.PaymentOptionChain; name: string; + code: Types.PaymentOptionCode; network: Types.PaymentOptionNetwork; symbol: string; min_sendable?: string | null; @@ -220,9 +219,8 @@ export const GetWalletContactDocument = gql` encryption_pubkey payment_options { id - code - chain name + code network symbol min_sendable diff --git a/src/graphql/queries/contacts.ts b/src/graphql/queries/contacts.ts index abb9a7a8..f9857cdc 100644 --- a/src/graphql/queries/contacts.ts +++ b/src/graphql/queries/contacts.ts @@ -37,9 +37,8 @@ export const GetWalletContact = gql` encryption_pubkey payment_options { id - code - chain name + code network symbol min_sendable diff --git a/src/graphql/types.ts b/src/graphql/types.ts index e510ecbc..12841487 100644 --- a/src/graphql/types.ts +++ b/src/graphql/types.ts @@ -161,14 +161,12 @@ export type LiquidTransaction = { }; export type LnAddressPaymentOption = { - chain: Scalars['String']['input']; code: Scalars['String']['input']; network: Scalars['String']['input']; }; export type LnUrlCurrency = { __typename?: 'LnUrlCurrency'; - chain: PaymentOptionChain; code: PaymentOptionCode; decimals: Scalars['Float']['output']; fixed_fee: Scalars['String']['output']; @@ -266,11 +264,6 @@ export type PayMutationsMoney_AddressArgs = { input: PayLnAddressInput; }; -export enum PaymentOptionChain { - Btc = 'BTC', - Liquid = 'LIQUID', -} - export enum PaymentOptionCode { Btc = 'BTC', Lightning = 'LIGHTNING', @@ -278,7 +271,8 @@ export enum PaymentOptionCode { } export enum PaymentOptionNetwork { - Mainnet = 'MAINNET', + Bitcoin = 'BITCOIN', + Liquid = 'LIQUID', } export type Query = { diff --git a/src/stores/contacts.ts b/src/stores/contacts.ts index ad428bf5..2fcb817c 100644 --- a/src/stores/contacts.ts +++ b/src/stores/contacts.ts @@ -19,10 +19,9 @@ export const useContactStore = create()(set => ({ export type PaymentOption = { id: string; + name: string; code: string; - chain: string; network: string; - name: string; symbol: string; max_sendable: number | null; min_sendable: number | null; diff --git a/src/views/contacts/MessageBox.tsx b/src/views/contacts/MessageBox.tsx index 44165e0a..d8482726 100644 --- a/src/views/contacts/MessageBox.tsx +++ b/src/views/contacts/MessageBox.tsx @@ -33,9 +33,8 @@ export const ContactMessageBox = () => { const { id, - code, - chain, name, + code, network, symbol, max_sendable, @@ -47,9 +46,8 @@ export const ContactMessageBox = () => { setCurrentPaymentOption({ id, - code, - chain, name, + code, network, symbol, min_sendable: min_sendable ? Number(min_sendable) : null, diff --git a/src/views/contacts/boxes/PayBox.tsx b/src/views/contacts/boxes/PayBox.tsx index 97c65436..62b6707e 100644 --- a/src/views/contacts/boxes/PayBox.tsx +++ b/src/views/contacts/boxes/PayBox.tsx @@ -150,7 +150,6 @@ export const PayMessageBox: FC<{ amount: inputValue.number * 10 ** currentPaymentOption.decimals, payment_option: { code: currentPaymentOption.code, - chain: currentPaymentOption.chain, network: currentPaymentOption.network, }, }, @@ -306,7 +305,6 @@ export const PayMessageBox: FC<{ const { id, code, - chain, name, network, symbol, @@ -319,9 +317,8 @@ export const PayMessageBox: FC<{ setCurrentPaymentOption({ id, - code, - chain, name, + code, network, symbol, min_sendable: min_sendable ? Number(min_sendable) : null,