diff --git a/app/screens/receive-bitcoin-screen/receive-screen.tsx b/app/screens/receive-bitcoin-screen/receive-screen.tsx index 5bf069a5a0..1c2a530fca 100644 --- a/app/screens/receive-bitcoin-screen/receive-screen.tsx +++ b/app/screens/receive-bitcoin-screen/receive-screen.tsx @@ -139,7 +139,7 @@ const ReceiveScreen = () => { }, { id: WalletCurrency.Usd, - text: "Stablesats", + text: "Dollar", icon: { selected: , normal: ( diff --git a/dev/vendir.lock.yml b/dev/vendir.lock.yml index 031802c44a..07b391dd92 100644 --- a/dev/vendir.lock.yml +++ b/dev/vendir.lock.yml @@ -2,10 +2,10 @@ apiVersion: vendir.k14s.io/v1alpha1 directories: - contents: - git: - commitTitle: 'chore(release): [ci skip] bump quickstart image to sha256@949763b555858318808b9bc7fee2e33fa2deb7252a2c0eed1e7a9ad65193f021' - sha: a685e23f4986b51175ddb093b6005f0246409a4d + commitTitle: 'chore(release): [ci skip] bump quickstart image to sha256@e06d6381813012d3abcf129d9eb10e8e7fae7c9cfd9a6857b726a9cbba238f93' + sha: 14743a8178f215f429608615db872ceb3b114bdb tags: - - 0.20.126 + - 0.20.151 path: galoy-quickstart path: vendor kind: LockConfig diff --git a/dev/vendir.yml b/dev/vendir.yml index 26f7d74751..e9a5071973 100644 --- a/dev/vendir.yml +++ b/dev/vendir.yml @@ -7,7 +7,7 @@ directories: - path: galoy-quickstart git: url: https://github.com/GaloyMoney/galoy.git - ref: '0.20.126' + ref: '0.20.151' includePaths: - quickstart/bin/* - quickstart/dev/**/* diff --git a/dev/vendor/galoy-quickstart/dev/BUCK b/dev/vendor/galoy-quickstart/dev/BUCK index 1618908dd8..614d6433fe 100644 --- a/dev/vendor/galoy-quickstart/dev/BUCK +++ b/dev/vendor/galoy-quickstart/dev/BUCK @@ -46,6 +46,7 @@ supergraph( "NOTIFICATIONS_SCHEMA": "//core/notifications:sdl", "PUBLIC_SCHEMA": "//core/api:public-sdl", }, + visibility = ["PUBLIC"], ) diff_check( @@ -76,11 +77,6 @@ sh_binary( main = "bin/update-schemas.sh", ) -sh_binary( - name = "codegen", - main = "bin/codegen.sh", -) - sh_binary( name = "init-onchain", main = "bin/init-onchain.sh", diff --git a/dev/vendor/galoy-quickstart/dev/Tiltfile b/dev/vendor/galoy-quickstart/dev/Tiltfile index e4ec53d449..cc63778eb9 100644 --- a/dev/vendor/galoy-quickstart/dev/Tiltfile +++ b/dev/vendor/galoy-quickstart/dev/Tiltfile @@ -49,6 +49,27 @@ def _buck2_dep_inputs(target): return rel_file_paths +def merge_env_file(file_path_str, env_vars={}): + repo_root = str(local("git rev-parse --show-toplevel")).strip() + env_file_path = "{}/{}".format(repo_root, file_path_str) + + file_blob = read_file(env_file_path, "") + lines = str(file_blob).split('\n') + for raw_line in lines: + if raw_line.startswith('#') or raw_line.strip() == '': + continue + + line = raw_line + if raw_line.startswith('export '): + line = raw_line[len('export '):].strip() + + key_value = line.split('=', 1) + if len(key_value) == 2: + key, value = key_value[0], key_value[1].strip('"') + env_vars[key] = value + + return env_vars + dashboard_target = "//apps/dashboard:dev" if is_ci: dashboard_target = '//apps/dashboard:dashboard' @@ -79,7 +100,7 @@ local_resource( "svix-pg", "add-test-users-with-usernames", "fund-user", - "notifications", + "api", ], links = [ link("http://localhost:3001", "dashboard"), @@ -382,7 +403,9 @@ local_resource( ) env_json = _buck2_dep_inputs("//dev:serve_env")[0] -core_serve_env = read_json(env_json) +core_serve_env_from_json = read_json(env_json) +local_env_file = ".env.local" +core_serve_env = merge_env_file(local_env_file, core_serve_env_from_json) callback_target = "//bats/helpers/callback:run" local_resource( @@ -421,6 +444,7 @@ local_resource( "mongodb", "oathkeeper", "svix", + "notifications", ] ) @@ -523,9 +547,7 @@ local_resource( "OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4317", }, deps = _buck2_dep_inputs(notifications_target), - allow_parallel = True, resource_deps = [ - "api", "notifications-pg" ] ) diff --git a/dev/vendor/galoy-quickstart/dev/config/apollo-federation/supergraph.graphql b/dev/vendor/galoy-quickstart/dev/config/apollo-federation/supergraph.graphql index 9a33f6f3a0..e99e56a39c 100644 --- a/dev/vendor/galoy-quickstart/dev/config/apollo-federation/supergraph.graphql +++ b/dev/vendor/galoy-quickstart/dev/config/apollo-federation/supergraph.graphql @@ -468,6 +468,22 @@ type Currency symbol: String! } +type CurrencyConversionEstimation + @join__type(graph: PUBLIC) +{ + """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: PUBLIC) { @@ -662,6 +678,9 @@ interface Invoice { createdAt: Timestamp! + """The unique external id set for the invoice.""" + externalId: TxExternalId! + """The payment hash of the lightning invoice.""" paymentHash: PaymentHash! @@ -750,6 +769,7 @@ type LnInvoice implements Invoice @join__type(graph: PUBLIC) { createdAt: Timestamp! + externalId: TxExternalId! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! @@ -868,6 +888,7 @@ type LnNoAmountInvoice implements Invoice @join__type(graph: PUBLIC) { createdAt: Timestamp! + externalId: TxExternalId! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! @@ -1252,6 +1273,7 @@ type Mutation onChainUsdPaymentSend(input: OnChainUsdPaymentSendInput!): PaymentSendPayload! @join__field(graph: PUBLIC) onChainUsdPaymentSendAsBtcDenominated(input: OnChainUsdPaymentSendAsBtcDenominatedInput!): PaymentSendPayload! @join__field(graph: PUBLIC) quizClaim(input: QuizClaimInput!): QuizClaimPayload! @join__field(graph: PUBLIC) + supportChatMessageAdd(input: SupportChatMessageAddInput!): SupportChatMessageAddPayload! @join__field(graph: PUBLIC) userContactUpdateAlias(input: UserContactUpdateAliasInput!): UserContactUpdateAliasPayload! @join__field(graph: PUBLIC) @deprecated(reason: "will be moved to AccountContact") userEmailDelete: UserEmailDeletePayload! @join__field(graph: PUBLIC) userEmailRegistrationInitiate(input: UserEmailRegistrationInitiateInput!): UserEmailRegistrationInitiatePayload! @join__field(graph: PUBLIC) @@ -1587,6 +1609,15 @@ type Query authorization: Authorization! @join__field(graph: PUBLIC) btcPriceList(range: PriceGraphRange!): [PricePoint] @join__field(graph: PUBLIC) businessMapMarkers: [MapMarker!]! @join__field(graph: PUBLIC) + + """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: PUBLIC) currencyList: [Currency!]! @join__field(graph: PUBLIC) globals: Globals @join__field(graph: PUBLIC) lnInvoicePaymentStatus(input: LnInvoicePaymentStatusInput!): LnInvoicePaymentStatusPayload! @join__field(graph: PUBLIC) @deprecated(reason: "Deprecated in favor of lnInvoicePaymentStatusByPaymentRequest") @@ -1598,7 +1629,9 @@ type Query onChainUsdTxFee(address: OnChainAddress!, amount: CentAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainUsdTxFee! @join__field(graph: PUBLIC) onChainUsdTxFeeAsBtcDenominated(address: OnChainAddress!, amount: SatAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainUsdTxFee! @join__field(graph: PUBLIC) - """Returns 1 Sat and 1 Usd Cent price for the given currency""" + """ + Returns 1 Sat and 1 Usd Cent price for the given currency in minor unit + """ realtimePrice(currency: DisplayCurrency = "USD"): RealtimePrice! @join__field(graph: PUBLIC) userDefaultWalletId(username: Username!): WalletId! @join__field(graph: PUBLIC) @deprecated(reason: "will be migrated to AccountDefaultWalletId") usernameAvailable(username: Username!): Boolean @join__field(graph: PUBLIC) @@ -1631,7 +1664,8 @@ type RealtimePrice @join__type(graph: PUBLIC) { btcSatPrice: PriceOfOneSatInMinorUnit! - denominatorCurrency: DisplayCurrency! + denominatorCurrency: DisplayCurrency! @deprecated(reason: "Deprecated in favor of denominatorCurrencyDetails") + denominatorCurrencyDetails: Currency! id: ID! """ @@ -1747,6 +1781,35 @@ type SuccessPayload success: Boolean } +input SupportChatMessageAddInput + @join__type(graph: PUBLIC) +{ + message: String! +} + +type SupportChatMessageAddPayload + @join__type(graph: PUBLIC) +{ + errors: [Error!]! + supportMessage: [SupportMessage] +} + +type SupportMessage + @join__type(graph: PUBLIC) +{ + id: ID! + message: String! + role: SupportRole! + timestamp: Timestamp! +} + +enum SupportRole + @join__type(graph: PUBLIC) +{ + ASSISTANT @join__enumValue(graph: PUBLIC) + USER @join__enumValue(graph: PUBLIC) +} + """ Timestamp field, serialized as Unix time (the number of seconds since the Unix epoch) """ @@ -1778,6 +1841,7 @@ type Transaction { createdAt: Timestamp! direction: TxDirection! + externalId: TxExternalId id: ID! """From which protocol the payment has been initiated.""" @@ -1831,6 +1895,12 @@ enum TxDirection SEND @join__enumValue(graph: PUBLIC) } +""" +An external reference id that can be optionally added for transactions. +""" +scalar TxExternalId + @join__type(graph: PUBLIC) + enum TxNotificationType @join__type(graph: PUBLIC) { @@ -1961,6 +2031,7 @@ type User """Phone number with international calling code.""" phone: Phone @join__field(graph: PUBLIC) + supportChat: [SupportMessage!]! @join__field(graph: PUBLIC) """Whether TOTP is enabled for this user.""" totpEnabled: Boolean! @join__field(graph: PUBLIC) @@ -2103,9 +2174,10 @@ enum UserNotificationCategory { CIRCLES @join__enumValue(graph: NOTIFICATIONS) PAYMENTS @join__enumValue(graph: NOTIFICATIONS) - BALANCE @join__enumValue(graph: NOTIFICATIONS) ADMIN_NOTIFICATION @join__enumValue(graph: NOTIFICATIONS) MARKETING @join__enumValue(graph: NOTIFICATIONS) + PRICE @join__enumValue(graph: NOTIFICATIONS) + SECURITY @join__enumValue(graph: NOTIFICATIONS) } enum UserNotificationChannel diff --git a/dev/vendor/galoy-quickstart/dev/core-bundle/integration-env.json b/dev/vendor/galoy-quickstart/dev/core-bundle/integration-env.json index ac705cc3ff..f15a63d7c3 100644 --- a/dev/vendor/galoy-quickstart/dev/core-bundle/integration-env.json +++ b/dev/vendor/galoy-quickstart/dev/core-bundle/integration-env.json @@ -25,6 +25,8 @@ "GEETEST_ID": "geetest_id", "GEETEST_KEY": "geetest_key", + "OTEL_TRACES_SAMPLER": "always_on", + "LND1_TLS": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZVENDQWdlZ0F3SUJBZ0lSQU9zZzdYWFR4cnVZYlhkeTY2d3RuN1F3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1PRFl4T1RneApNak5tT0Roak1CNFhEVEl6TURFeE9USXdOREUxTTFvWERUTTBNRGN5TVRJd05ERTFNMW93T0RFZk1CMEdBMVVFCkNoTVdiRzVrSUdGMWRHOW5aVzVsY21GMFpXUWdZMlZ5ZERFVk1CTUdBMVVFQXhNTU9EWXhPVGd4TWpObU9EaGoKTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFM1lieUlKWU1Vcm8zZkl0UFFucysxZ2lpTXI5NQpJUXRmclFDQ2JhOWVtcjI4TENmbk1vYy9VQVFwUlg3QVlvVFRneUdiMFBuZGNUODF5ZVgvYTlPa0RLT0I4VENCCjdqQU9CZ05WSFE4QkFmOEVCQU1DQXFRd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3RXdEd1lEVlIwVEFRSC8KQkFVd0F3RUIvekFkQmdOVkhRNEVGZ1FVL1AxRHpJUkRzTEhHMU10d3NrZE5nZ0lub1Mwd2daWUdBMVVkRVFTQgpqakNCaTRJTU9EWXhPVGd4TWpObU9EaGpnZ2xzYjJOaGJHaHZjM1NDRFd4dVpDMXZkWFJ6YVdSbExUR0NEV3h1ClpDMXZkWFJ6YVdSbExUS0NEV3h1WkMxdmRYUnphV1JsTFRPQ0JHeHVaREdDQkd4dVpES0NCSFZ1YVhpQ0NuVnUKYVhod1lXTnJaWFNDQjJKMVptTnZibTZIQkg4QUFBR0hFQUFBQUFBQUFBQUFBQUFBQUFBQUFBR0hCS3dUQUJBdwpDZ1lJS29aSXpqMEVBd0lEU0FBd1JRSWhBSU5DNlJWQ3d6SzFYRnFxeVNLY0Y4QzQ5ZFlSOThjemdLNVdkcmNOCkxYYWlBaUJHYmtWeGhaeHdDaDVLQ1o1Z2M1Q2FsQ0RvaGNxVkdiaHNya0hHTFhpdHN3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=", "LND1_MACAROON": "AgEDbG5kAvgBAwoQB1FdhGa9xoewc1LEXmnURRIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaIQoIbWFjYXJvb24SCGdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgqHDdwGCqx0aQL1/Z3uUfzCpeBhfapGf9s/AZPOVwf6s=", "LND1_PUBKEY":"03ca1907342d5d37744cb7038375e1867c24a87564c293157c95b2a9d38dcfb4c2", diff --git a/dev/vendor/galoy-quickstart/dev/core-bundle/serve-env.json b/dev/vendor/galoy-quickstart/dev/core-bundle/serve-env.json index 7d22416af7..5690aa6532 100644 --- a/dev/vendor/galoy-quickstart/dev/core-bundle/serve-env.json +++ b/dev/vendor/galoy-quickstart/dev/core-bundle/serve-env.json @@ -25,6 +25,8 @@ "GEETEST_ID": "geetest_id", "GEETEST_KEY": "geetest_key", + "OTEL_TRACES_SAMPLER": "always_on", + "LND1_TLS": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZVENDQWdlZ0F3SUJBZ0lSQU9zZzdYWFR4cnVZYlhkeTY2d3RuN1F3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1PRFl4T1RneApNak5tT0Roak1CNFhEVEl6TURFeE9USXdOREUxTTFvWERUTTBNRGN5TVRJd05ERTFNMW93T0RFZk1CMEdBMVVFCkNoTVdiRzVrSUdGMWRHOW5aVzVsY21GMFpXUWdZMlZ5ZERFVk1CTUdBMVVFQXhNTU9EWXhPVGd4TWpObU9EaGoKTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFM1lieUlKWU1Vcm8zZkl0UFFucysxZ2lpTXI5NQpJUXRmclFDQ2JhOWVtcjI4TENmbk1vYy9VQVFwUlg3QVlvVFRneUdiMFBuZGNUODF5ZVgvYTlPa0RLT0I4VENCCjdqQU9CZ05WSFE4QkFmOEVCQU1DQXFRd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3RXdEd1lEVlIwVEFRSC8KQkFVd0F3RUIvekFkQmdOVkhRNEVGZ1FVL1AxRHpJUkRzTEhHMU10d3NrZE5nZ0lub1Mwd2daWUdBMVVkRVFTQgpqakNCaTRJTU9EWXhPVGd4TWpObU9EaGpnZ2xzYjJOaGJHaHZjM1NDRFd4dVpDMXZkWFJ6YVdSbExUR0NEV3h1ClpDMXZkWFJ6YVdSbExUS0NEV3h1WkMxdmRYUnphV1JsTFRPQ0JHeHVaREdDQkd4dVpES0NCSFZ1YVhpQ0NuVnUKYVhod1lXTnJaWFNDQjJKMVptTnZibTZIQkg4QUFBR0hFQUFBQUFBQUFBQUFBQUFBQUFBQUFBR0hCS3dUQUJBdwpDZ1lJS29aSXpqMEVBd0lEU0FBd1JRSWhBSU5DNlJWQ3d6SzFYRnFxeVNLY0Y4QzQ5ZFlSOThjemdLNVdkcmNOCkxYYWlBaUJHYmtWeGhaeHdDaDVLQ1o1Z2M1Q2FsQ0RvaGNxVkdiaHNya0hHTFhpdHN3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=", "LND1_MACAROON": "AgEDbG5kAvgBAwoQB1FdhGa9xoewc1LEXmnURRIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaIQoIbWFjYXJvb24SCGdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgqHDdwGCqx0aQL1/Z3uUfzCpeBhfapGf9s/AZPOVwf6s=", "LND1_PUBKEY":"03ca1907342d5d37744cb7038375e1867c24a87564c293157c95b2a9d38dcfb4c2", diff --git a/dev/vendor/galoy-quickstart/docker-compose.yml b/dev/vendor/galoy-quickstart/docker-compose.yml index 71c97dcd2d..3c3b2ca5e4 100644 --- a/dev/vendor/galoy-quickstart/docker-compose.yml +++ b/dev/vendor/galoy-quickstart/docker-compose.yml @@ -98,7 +98,7 @@ services: - POSTGRES_PASSWORD=secret - POSTGRES_DB=hydra galoy: - image: us.gcr.io/galoy-org/galoy-api@sha256:949763b555858318808b9bc7fee2e33fa2deb7252a2c0eed1e7a9ad65193f021 + image: us.gcr.io/galoy-org/galoy-api@sha256:e06d6381813012d3abcf129d9eb10e8e7fae7c9cfd9a6857b726a9cbba238f93 environment: - HELMREVISION=dev - NETWORK=regtest @@ -161,7 +161,7 @@ services: aliases: - bats-tests trigger: - image: us.gcr.io/galoy-org/galoy-api-trigger@sha256:8cd1c54070a2b27086391f372f0fb87fee9c35b7bc4a4ed6775f09b82b27c99c + image: us.gcr.io/galoy-org/galoy-api-trigger@sha256:b3b05fbc26a271e98868dccae008fdca2856e658975584f1e125f56dcfd588cd environment: - HELMREVISION=dev - NETWORK=regtest @@ -213,7 +213,7 @@ services: - bria - mongodb notifications: - image: us.gcr.io/galoy-org/galoy-notifications@sha256:d86095c8470a4ce551fbe65d507d333983c5f201ddfa27a733eb4d3758c4682d + image: us.gcr.io/galoy-org/galoy-notifications@sha256:6463fd024ba6de7c5f98745aeec8c2328fee909a3ae1cd18b1fde92473f43f2a environment: - PG_CON=postgres://user:password@notifications-pg:5432/pg - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-agent:4318 @@ -254,7 +254,7 @@ services: environment: - MONGO_INITDB_DATABASE=galoy mongodb-migrate: - image: us.gcr.io/galoy-org/galoy-api-migrate@sha256:63fbc734fbd6a7c545a81375736614bf751d8052da50391a979448d64f555718 + image: us.gcr.io/galoy-org/galoy-api-migrate@sha256:551a443b32384262dfdf55f3dec5f09a168636bf40f0315d581614a8d166944b depends_on: - mongodb environment: diff --git a/dev/vendor/galoy-quickstart/graphql/gql/currency-conversion-estimation.gql b/dev/vendor/galoy-quickstart/graphql/gql/currency-conversion-estimation.gql new file mode 100644 index 0000000000..11fa87a6c9 --- /dev/null +++ b/dev/vendor/galoy-quickstart/graphql/gql/currency-conversion-estimation.gql @@ -0,0 +1,8 @@ +query CurrencyConversionEstimation($amount: Float!, $currency: DisplayCurrency!) { + currencyConversionEstimation(amount: $amount, currency: $currency) { + btcSatAmount + id + timestamp + usdCentAmount + } +} diff --git a/dev/vendor/galoy-quickstart/graphql/gql/my-updates-sub.gql b/dev/vendor/galoy-quickstart/graphql/gql/my-updates-sub.gql index 94297df873..867736cb86 100644 --- a/dev/vendor/galoy-quickstart/graphql/gql/my-updates-sub.gql +++ b/dev/vendor/galoy-quickstart/graphql/gql/my-updates-sub.gql @@ -25,6 +25,13 @@ subscription myUpdates { ... on RealtimePrice { id timestamp + denominatorCurrencyDetails { + flag + fractionDigits + id + name + symbol + } denominatorCurrency btcSatPrice { base diff --git a/dev/vendor/galoy-quickstart/graphql/gql/real-time-price-sub.gql b/dev/vendor/galoy-quickstart/graphql/gql/real-time-price-sub.gql index 00c13d1b29..e952874cc5 100644 --- a/dev/vendor/galoy-quickstart/graphql/gql/real-time-price-sub.gql +++ b/dev/vendor/galoy-quickstart/graphql/gql/real-time-price-sub.gql @@ -6,6 +6,13 @@ subscription realtimePrice($currency: DisplayCurrency!) { realtimePrice { id timestamp + denominatorCurrencyDetails { + flag + fractionDigits + id + name + symbol + } denominatorCurrency btcSatPrice { base diff --git a/dev/vendor/galoy-quickstart/graphql/gql/real-time-price.gql b/dev/vendor/galoy-quickstart/graphql/gql/real-time-price.gql new file mode 100644 index 0000000000..6b7e73aa23 --- /dev/null +++ b/dev/vendor/galoy-quickstart/graphql/gql/real-time-price.gql @@ -0,0 +1,22 @@ +query RealtimePrice($currency: DisplayCurrency) { + realtimePrice(currency: $currency) { + btcSatPrice { + base + offset + } + denominatorCurrencyDetails { + flag + fractionDigits + id + name + symbol + } + denominatorCurrency + id + timestamp + usdCentPrice { + base + offset + } + } +} diff --git a/dev/vendor/galoy-quickstart/graphql/gql/support-chat-message-add.gql b/dev/vendor/galoy-quickstart/graphql/gql/support-chat-message-add.gql new file mode 100644 index 0000000000..7aeded6911 --- /dev/null +++ b/dev/vendor/galoy-quickstart/graphql/gql/support-chat-message-add.gql @@ -0,0 +1,16 @@ +mutation supportChatMessageAdd($input: SupportChatMessageAddInput!) { + supportChatMessageAdd(input: $input) { + errors { + message + __typename + } + supportMessage { + id + message + role + timestamp + __typename + } + __typename + } +} diff --git a/dev/vendor/galoy-quickstart/graphql/gql/support-chat.gql b/dev/vendor/galoy-quickstart/graphql/gql/support-chat.gql new file mode 100644 index 0000000000..6de2a926b4 --- /dev/null +++ b/dev/vendor/galoy-quickstart/graphql/gql/support-chat.gql @@ -0,0 +1,11 @@ +query supportChat { + me { + id + supportChat { + id + message + role + timestamp + } + } +} diff --git a/dev/vendor/galoy-quickstart/graphql/schemas/admin/schema.graphql b/dev/vendor/galoy-quickstart/graphql/schemas/admin/schema.graphql index 95040c7b7c..18b6bcc4cf 100644 --- a/dev/vendor/galoy-quickstart/graphql/schemas/admin/schema.graphql +++ b/dev/vendor/galoy-quickstart/graphql/schemas/admin/schema.graphql @@ -186,6 +186,9 @@ type InitiationViaOnChain { interface Invoice { createdAt: Timestamp! + """The unique external id set for the invoice.""" + externalId: TxExternalId! + """The payment hash of the lightning invoice.""" paymentHash: PaymentHash! @@ -369,7 +372,6 @@ type Query { filteredUserCount(phoneCountryCodesFilter: [CountryCode!], userIdsFilter: [ID!]): Int! lightningInvoice(hash: PaymentHash!): LightningInvoice! lightningPayment(hash: PaymentHash!): LightningPayment! - listWalletIds(walletCurrency: WalletCurrency!): [WalletId!]! merchantsPendingApproval: [Merchant!]! transactionById(id: ID!): Transaction transactionsByHash(hash: PaymentHash!): [Transaction] @@ -435,6 +437,7 @@ or with lightning but settled intraledger. type Transaction { createdAt: Timestamp! direction: TxDirection! + externalId: TxExternalId id: ID! """From which protocol the payment has been initiated.""" @@ -482,6 +485,11 @@ enum TxDirection { SEND } +""" +An external reference id that can be optionally added for transactions. +""" +scalar TxExternalId + enum TxStatus { FAILURE PENDING diff --git a/dev/vendor/galoy-quickstart/graphql/schemas/public/schema.graphql b/dev/vendor/galoy-quickstart/graphql/schemas/public/schema.graphql index 441c959c61..8884e7f96d 100644 --- a/dev/vendor/galoy-quickstart/graphql/schemas/public/schema.graphql +++ b/dev/vendor/galoy-quickstart/graphql/schemas/public/schema.graphql @@ -338,6 +338,20 @@ type Currency { symbol: String! } +type CurrencyConversionEstimation { + """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 { minBankFee: String! @@ -487,6 +501,9 @@ input IntraLedgerUsdPaymentSendInput { interface Invoice { createdAt: Timestamp! + """The unique external id set for the invoice.""" + externalId: TxExternalId! + """The payment hash of the lightning invoice.""" paymentHash: PaymentHash! @@ -541,6 +558,7 @@ input LnAddressPaymentSendInput { type LnInvoice implements Invoice { createdAt: Timestamp! + externalId: TxExternalId! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! @@ -634,6 +652,7 @@ type LnInvoicePaymentStatusPayload { type LnNoAmountInvoice implements Invoice { createdAt: Timestamp! + externalId: TxExternalId! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! @@ -965,6 +984,7 @@ type Mutation { onChainUsdPaymentSend(input: OnChainUsdPaymentSendInput!): PaymentSendPayload! onChainUsdPaymentSendAsBtcDenominated(input: OnChainUsdPaymentSendAsBtcDenominatedInput!): PaymentSendPayload! quizClaim(input: QuizClaimInput!): QuizClaimPayload! + supportChatMessageAdd(input: SupportChatMessageAddInput!): SupportChatMessageAddPayload! userContactUpdateAlias(input: UserContactUpdateAliasInput!): UserContactUpdateAliasPayload! @deprecated(reason: "will be moved to AccountContact") userEmailDelete: UserEmailDeletePayload! userEmailRegistrationInitiate(input: UserEmailRegistrationInitiateInput!): UserEmailRegistrationInitiatePayload! @@ -1224,6 +1244,15 @@ type Query { authorization: Authorization! btcPriceList(range: PriceGraphRange!): [PricePoint] businessMapMarkers: [MapMarker!]! + + """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! currencyList: [Currency!]! globals: Globals lnInvoicePaymentStatus(input: LnInvoicePaymentStatusInput!): LnInvoicePaymentStatusPayload! @deprecated(reason: "Deprecated in favor of lnInvoicePaymentStatusByPaymentRequest") @@ -1235,7 +1264,9 @@ type Query { onChainUsdTxFee(address: OnChainAddress!, amount: CentAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainUsdTxFee! onChainUsdTxFeeAsBtcDenominated(address: OnChainAddress!, amount: SatAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainUsdTxFee! - """Returns 1 Sat and 1 Usd Cent price for the given currency""" + """ + Returns 1 Sat and 1 Usd Cent price for the given currency in minor unit + """ realtimePrice(currency: DisplayCurrency = "USD"): RealtimePrice! userDefaultWalletId(username: Username!): WalletId! @deprecated(reason: "will be migrated to AccountDefaultWalletId") usernameAvailable(username: Username!): Boolean @@ -1260,7 +1291,8 @@ type QuizClaimPayload { type RealtimePrice { btcSatPrice: PriceOfOneSatInMinorUnit! - denominatorCurrency: DisplayCurrency! + denominatorCurrency: DisplayCurrency! @deprecated(reason: "Deprecated in favor of denominatorCurrencyDetails") + denominatorCurrencyDetails: Currency! id: ID! """ @@ -1347,6 +1379,27 @@ type SuccessPayload { success: Boolean } +input SupportChatMessageAddInput { + message: String! +} + +type SupportChatMessageAddPayload { + errors: [Error!]! + supportMessage: [SupportMessage] +} + +type SupportMessage { + id: ID! + message: String! + role: SupportRole! + timestamp: Timestamp! +} + +enum SupportRole { + ASSISTANT + USER +} + """ Timestamp field, serialized as Unix time (the number of seconds since the Unix epoch) """ @@ -1371,6 +1424,7 @@ or with lightning but settled intraledger. type Transaction { createdAt: Timestamp! direction: TxDirection! + externalId: TxExternalId id: ID! """From which protocol the payment has been initiated.""" @@ -1418,6 +1472,11 @@ enum TxDirection { SEND } +""" +An external reference id that can be optionally added for transactions. +""" +scalar TxExternalId + enum TxNotificationType { IntraLedgerPayment IntraLedgerReceipt @@ -1532,6 +1591,7 @@ type User { """Phone number with international calling code.""" phone: Phone + supportChat: [SupportMessage!]! """Whether TOTP is enabled for this user.""" totpEnabled: Boolean! diff --git a/e2e/detox/03-payment-send.test.ts b/e2e/detox/03-payment-send.test.ts index 32c86d8f2d..dfac557651 100644 --- a/e2e/detox/03-payment-send.test.ts +++ b/e2e/detox/03-payment-send.test.ts @@ -28,7 +28,7 @@ describe("Send: Intraledger using Username - BTC Amount", () => { await waitFor(usernameInput).toBeVisible().withTimeout(timeout) await usernameInput.clearText() await usernameInput.typeText(BOB_USERNAME) - await tap(by.id(LL.common.next())) + await tap(by.id(LL.common.next()), 3) try { await tap(by.id("address-is-right")) @@ -73,7 +73,7 @@ describe("Send: Intraledger using Username - USD Amount", () => { await waitFor(usernameInput).toBeVisible().withTimeout(timeout) await usernameInput.clearText() await usernameInput.typeText(BOB_USERNAME) - await tap(by.id(LL.common.next())) + await tap(by.id(LL.common.next()), 3) try { await tap(by.id("address-is-right")) diff --git a/e2e/detox/04-payment-receive.test.ts b/e2e/detox/04-payment-receive.test.ts index 09bd3384cb..e75b53028b 100644 --- a/e2e/detox/04-payment-receive.test.ts +++ b/e2e/detox/04-payment-receive.test.ts @@ -97,7 +97,7 @@ describe("Receive: LN Stablesats Amountless", () => { const amountInput = element(by.id("Amount Input Button")) await waitFor(amountInput).toBeVisible().withTimeout(timeout) - await tap(by.id("Stablesats")) + await tap(by.id("Dollar")) await sleep(1000) const readablePaymentRequest = element(by.id("readable-payment-request")) @@ -124,7 +124,7 @@ describe("Receive: LN Stablesats $0.02 Amount", () => { const amountInput = element(by.id("Amount Input Button")) await waitFor(amountInput).toBeVisible().withTimeout(timeout) - await tap(by.id("Stablesats")) + await tap(by.id("Dollar")) await sleep(1000) // await element(by.id("receive-screen")).scroll(400, "down", NaN, 0.85) @@ -181,7 +181,7 @@ describe("Receive: Onchain Stablesats", () => { await tap(by.id("Onchain"), 30) await sleep(500) - await tap(by.id("Stablesats")) + await tap(by.id("Dollar")) await sleep(500) const qrCode = element(by.id("QR-Code"))