Skip to content

Commit

Permalink
chore: lnurl cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
apotdevin committed Jun 15, 2024
1 parent afa5be4 commit 5ec8003
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 24 deletions.
6 changes: 2 additions & 4 deletions src/graphql/queries/__generated__/contacts.generated.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/graphql/queries/contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ export const GetWalletContact = gql`
encryption_pubkey
payment_options {
id
code
chain
name
code
network
symbol
min_sendable
Expand Down
10 changes: 2 additions & 8 deletions src/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down Expand Up @@ -266,19 +264,15 @@ export type PayMutationsMoney_AddressArgs = {
input: PayLnAddressInput;
};

export enum PaymentOptionChain {
Btc = 'BTC',
Liquid = 'LIQUID',
}

export enum PaymentOptionCode {
Btc = 'BTC',
Lightning = 'LIGHTNING',
Usdt = 'USDT',
}

export enum PaymentOptionNetwork {
Mainnet = 'MAINNET',
Bitcoin = 'BITCOIN',
Liquid = 'LIQUID',
}

export type Query = {
Expand Down
3 changes: 1 addition & 2 deletions src/stores/contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ export const useContactStore = create<ContactState>()(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;
Expand Down
6 changes: 2 additions & 4 deletions src/views/contacts/MessageBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ export const ContactMessageBox = () => {

const {
id,
code,
chain,
name,
code,
network,
symbol,
max_sendable,
Expand All @@ -47,9 +46,8 @@ export const ContactMessageBox = () => {

setCurrentPaymentOption({
id,
code,
chain,
name,
code,
network,
symbol,
min_sendable: min_sendable ? Number(min_sendable) : null,
Expand Down
5 changes: 1 addition & 4 deletions src/views/contacts/boxes/PayBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
Expand Down Expand Up @@ -306,7 +305,6 @@ export const PayMessageBox: FC<{
const {
id,
code,
chain,
name,
network,
symbol,
Expand All @@ -319,9 +317,8 @@ export const PayMessageBox: FC<{

setCurrentPaymentOption({
id,
code,
chain,
name,
code,
network,
symbol,
min_sendable: min_sendable ? Number(min_sendable) : null,
Expand Down

0 comments on commit 5ec8003

Please sign in to comment.