Skip to content

Commit

Permalink
chore: update quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipndev committed Apr 16, 2024
1 parent caa6e50 commit 18a5d62
Show file tree
Hide file tree
Showing 19 changed files with 262 additions and 29 deletions.
2 changes: 1 addition & 1 deletion app/screens/receive-bitcoin-screen/receive-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const ReceiveScreen = () => {
},
{
id: WalletCurrency.Usd,
text: "Stablesats",
text: "Dollar",
icon: {
selected: <GaloyCurrencyBubble currency="USD" iconSize={16} />,
normal: (
Expand Down
6 changes: 3 additions & 3 deletions dev/vendir.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion dev/vendir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**/*
Expand Down
6 changes: 1 addition & 5 deletions dev/vendor/galoy-quickstart/dev/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ supergraph(
"NOTIFICATIONS_SCHEMA": "//core/notifications:sdl",
"PUBLIC_SCHEMA": "//core/api:public-sdl",
},
visibility = ["PUBLIC"],
)

diff_check(
Expand Down Expand Up @@ -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",
Expand Down
30 changes: 26 additions & 4 deletions dev/vendor/galoy-quickstart/dev/Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -79,7 +100,7 @@ local_resource(
"svix-pg",
"add-test-users-with-usernames",
"fund-user",
"notifications",
"api",
],
links = [
link("http://localhost:3001", "dashboard"),
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -421,6 +444,7 @@ local_resource(
"mongodb",
"oathkeeper",
"svix",
"notifications",
]
)

Expand Down Expand Up @@ -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"
]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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!

Expand Down Expand Up @@ -750,6 +769,7 @@ type LnInvoice implements Invoice
@join__type(graph: PUBLIC)
{
createdAt: Timestamp!
externalId: TxExternalId!
paymentHash: PaymentHash!
paymentRequest: LnPaymentRequest!
paymentSecret: LnPaymentSecret!
Expand Down Expand Up @@ -868,6 +888,7 @@ type LnNoAmountInvoice implements Invoice
@join__type(graph: PUBLIC)
{
createdAt: Timestamp!
externalId: TxExternalId!
paymentHash: PaymentHash!
paymentRequest: LnPaymentRequest!
paymentSecret: LnPaymentSecret!
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand All @@ -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)
Expand Down Expand Up @@ -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!

"""
Expand Down Expand Up @@ -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)
"""
Expand Down Expand Up @@ -1778,6 +1841,7 @@ type Transaction
{
createdAt: Timestamp!
direction: TxDirection!
externalId: TxExternalId
id: ID!

"""From which protocol the payment has been initiated."""
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"GEETEST_ID": "geetest_id",
"GEETEST_KEY": "geetest_key",

"OTEL_TRACES_SAMPLER": "always_on",

"LND1_TLS":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LY0Y4QzQ5ZFlSOThjemdLNVdkcmNOCkxYYWlBaUJHYmtWeGhaeHdDaDVLQ1o1Z2M1Q2FsQ0RvaGNxVkdiaHNya0hHTFhpdHN3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=",
"LND1_MACAROON": "AgEDbG5kAvgBAwoQB1FdhGa9xoewc1LEXmnURRIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaIQoIbWFjYXJvb24SCGdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgqHDdwGCqx0aQL1/Z3uUfzCpeBhfapGf9s/AZPOVwf6s=",
"LND1_PUBKEY":"03ca1907342d5d37744cb7038375e1867c24a87564c293157c95b2a9d38dcfb4c2",
Expand Down
2 changes: 2 additions & 0 deletions dev/vendor/galoy-quickstart/dev/core-bundle/serve-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"GEETEST_ID": "geetest_id",
"GEETEST_KEY": "geetest_key",

"OTEL_TRACES_SAMPLER": "always_on",

"LND1_TLS": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZVENDQWdlZ0F3SUJBZ0lSQU9zZzdYWFR4cnVZYlhkeTY2d3RuN1F3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1PRFl4T1RneApNak5tT0Roak1CNFhEVEl6TURFeE9USXdOREUxTTFvWERUTTBNRGN5TVRJd05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ZvaWNlcxIEcmVhZBIFd3JpdGUaIQoIbWFjYXJvb24SCGdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgqHDdwGCqx0aQL1/Z3uUfzCpeBhfapGf9s/AZPOVwf6s=",
"LND1_PUBKEY":"03ca1907342d5d37744cb7038375e1867c24a87564c293157c95b2a9d38dcfb4c2",
Expand Down
8 changes: 4 additions & 4 deletions dev/vendor/galoy-quickstart/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
query CurrencyConversionEstimation($amount: Float!, $currency: DisplayCurrency!) {
currencyConversionEstimation(amount: $amount, currency: $currency) {
btcSatAmount
id
timestamp
usdCentAmount
}
}
7 changes: 7 additions & 0 deletions dev/vendor/galoy-quickstart/graphql/gql/my-updates-sub.gql
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ subscription myUpdates {
... on RealtimePrice {
id
timestamp
denominatorCurrencyDetails {
flag
fractionDigits
id
name
symbol
}
denominatorCurrency
btcSatPrice {
base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ subscription realtimePrice($currency: DisplayCurrency!) {
realtimePrice {
id
timestamp
denominatorCurrencyDetails {
flag
fractionDigits
id
name
symbol
}
denominatorCurrency
btcSatPrice {
base
Expand Down
Loading

0 comments on commit 18a5d62

Please sign in to comment.