diff --git a/app/graphql/generated.gql b/app/graphql/generated.gql index c3fdede831..2dc3a20877 100644 --- a/app/graphql/generated.gql +++ b/app/graphql/generated.gql @@ -287,6 +287,7 @@ mutation lnInvoiceCreate($input: LnInvoiceCreateInput!) { paymentHash paymentRequest paymentStatus + externalId satoshis __typename } @@ -327,6 +328,7 @@ mutation lnNoAmountInvoiceCreate($input: LnNoAmountInvoiceCreateInput!) { paymentHash paymentRequest paymentStatus + externalId __typename } __typename @@ -388,6 +390,7 @@ mutation lnUsdInvoiceCreate($input: LnUsdInvoiceCreateInput!) { paymentHash paymentRequest paymentStatus + externalId satoshis __typename } diff --git a/app/graphql/generated.ts b/app/graphql/generated.ts index c96b21e85f..8e476d63cb 100644 --- a/app/graphql/generated.ts +++ b/app/graphql/generated.ts @@ -2648,14 +2648,14 @@ export type LnNoAmountInvoiceCreateMutationVariables = Exact<{ }>; -export type LnNoAmountInvoiceCreateMutation = { readonly __typename: 'Mutation', readonly lnNoAmountInvoiceCreate: { readonly __typename: 'LnNoAmountInvoicePayload', readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly message: string }>, readonly invoice?: { readonly __typename: 'LnNoAmountInvoice', readonly createdAt: number, readonly paymentHash: string, readonly paymentRequest: string, readonly paymentStatus: InvoicePaymentStatus } | null } }; +export type LnNoAmountInvoiceCreateMutation = { readonly __typename: 'Mutation', readonly lnNoAmountInvoiceCreate: { readonly __typename: 'LnNoAmountInvoicePayload', readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly message: string }>, readonly invoice?: { readonly __typename: 'LnNoAmountInvoice', readonly createdAt: number, readonly paymentHash: string, readonly paymentRequest: string, readonly paymentStatus: InvoicePaymentStatus, readonly externalId: string } | null } }; export type LnInvoiceCreateMutationVariables = Exact<{ input: LnInvoiceCreateInput; }>; -export type LnInvoiceCreateMutation = { readonly __typename: 'Mutation', readonly lnInvoiceCreate: { readonly __typename: 'LnInvoicePayload', readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly message: string }>, readonly invoice?: { readonly __typename: 'LnInvoice', readonly createdAt: number, readonly paymentHash: string, readonly paymentRequest: string, readonly paymentStatus: InvoicePaymentStatus, readonly satoshis: number } | null } }; +export type LnInvoiceCreateMutation = { readonly __typename: 'Mutation', readonly lnInvoiceCreate: { readonly __typename: 'LnInvoicePayload', readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly message: string }>, readonly invoice?: { readonly __typename: 'LnInvoice', readonly createdAt: number, readonly paymentHash: string, readonly paymentRequest: string, readonly paymentStatus: InvoicePaymentStatus, readonly externalId: string, readonly satoshis: number } | null } }; export type OnChainAddressCurrentMutationVariables = Exact<{ input: OnChainAddressCurrentInput; @@ -2669,7 +2669,7 @@ export type LnUsdInvoiceCreateMutationVariables = Exact<{ }>; -export type LnUsdInvoiceCreateMutation = { readonly __typename: 'Mutation', readonly lnUsdInvoiceCreate: { readonly __typename: 'LnInvoicePayload', readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly message: string }>, readonly invoice?: { readonly __typename: 'LnInvoice', readonly createdAt: number, readonly paymentHash: string, readonly paymentRequest: string, readonly paymentStatus: InvoicePaymentStatus, readonly satoshis: number } | null } }; +export type LnUsdInvoiceCreateMutation = { readonly __typename: 'Mutation', readonly lnUsdInvoiceCreate: { readonly __typename: 'LnInvoicePayload', readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly message: string }>, readonly invoice?: { readonly __typename: 'LnInvoice', readonly createdAt: number, readonly paymentHash: string, readonly paymentRequest: string, readonly paymentStatus: InvoicePaymentStatus, readonly externalId: string, readonly satoshis: number } | null } }; export type ScanningQrCodeScreenQueryVariables = Exact<{ [key: string]: never; }>; @@ -5151,6 +5151,7 @@ export const LnNoAmountInvoiceCreateDocument = gql` paymentHash paymentRequest paymentStatus + externalId } } } @@ -5192,6 +5193,7 @@ export const LnInvoiceCreateDocument = gql` paymentHash paymentRequest paymentStatus + externalId satoshis } } @@ -5270,6 +5272,7 @@ export const LnUsdInvoiceCreateDocument = gql` paymentHash paymentRequest paymentStatus + externalId satoshis } } diff --git a/app/screens/receive-bitcoin-screen/use-receive-bitcoin.ts b/app/screens/receive-bitcoin-screen/use-receive-bitcoin.ts index 170d9eef74..bff28cf7be 100644 --- a/app/screens/receive-bitcoin-screen/use-receive-bitcoin.ts +++ b/app/screens/receive-bitcoin-screen/use-receive-bitcoin.ts @@ -74,6 +74,7 @@ gql` paymentHash paymentRequest paymentStatus + externalId } } } @@ -88,6 +89,7 @@ gql` paymentHash paymentRequest paymentStatus + externalId satoshis } } @@ -112,6 +114,7 @@ gql` paymentHash paymentRequest paymentStatus + externalId satoshis } } diff --git a/supergraph.graphql b/supergraph.graphql index 06ee76bc32..3a92fbafa7 100644 --- a/supergraph.graphql +++ b/supergraph.graphql @@ -474,6 +474,22 @@ type Currency symbol: String! } +type CurrencyConversionEstimation + @join__type(graph: GALOY) +{ + """Amount in satoshis.""" + btcSatAmount: SatAmount! + id: ID! + + """ + Unix timestamp (number of seconds elapsed since January 1, 1970 00:00:00 UTC) + """ + timestamp: Timestamp! + + """Amount in USD cents.""" + usdCentAmount: CentAmount! +} + type DepositFeesInformation @join__type(graph: GALOY) { @@ -1642,6 +1658,15 @@ type Query authorization: Authorization! @join__field(graph: GALOY) btcPriceList(range: PriceGraphRange!): [PricePoint] @join__field(graph: GALOY) businessMapMarkers: [MapMarker!]! @join__field(graph: GALOY) + + """Returns an estimated conversion rate for the given amount and currency""" + currencyConversionEstimation( + """Amount in major unit.""" + amount: Float! + + """Currency of the amount to be converted.""" + currency: DisplayCurrency! + ): CurrencyConversionEstimation! @join__field(graph: GALOY) currencyList: [Currency!]! @join__field(graph: GALOY) globals: Globals @join__field(graph: GALOY) lnInvoicePaymentStatus(input: LnInvoicePaymentStatusInput!): LnInvoicePaymentStatusPayload! @join__field(graph: GALOY) @deprecated(reason: "Deprecated in favor of lnInvoicePaymentStatusByPaymentRequest")