Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dev/apollo-federation/supergraph.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,13 @@ type Globals

"""A list of countries and their supported auth channels"""
supportedCountries: [Country!]!

"""
Whether wallet top-up entry points (card webview and
bank-transfer-to-support) should be shown to the user. Controlled by the
instance-wide topup feature flag.
"""
topupEnabled: Boolean!
}

type GraphQLApplicationError implements Error
Expand Down
3 changes: 3 additions & 0 deletions dev/config/base-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ cashout:
from: "notifications@getflash.io"
subject: "New Cashout"

topup:
enabled: false

frappe:
url: http://flashapp.me.localhost:8000
sitename: flashapp.me.localhost # default sitename for frappe docker container
Expand Down
11 changes: 11 additions & 0 deletions src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,17 @@ export const configSchema = {
required: ["enabled", "minimum", "maximum", "accountLevel"],
default: { enabled: true },
},
topup: {
type: "object",
properties: {
enabled: { type: "boolean" },
},
required: ["enabled"],
additionalProperties: false,
// Default OFF: top-up entry points (card webview, bank-transfer-to-support)
// stay hidden unless explicitly enabled per the v0.6.0 flag ramp.
default: { enabled: false },
},
frappe: {
type: "object",
properties: {
Expand Down
3 changes: 3 additions & 0 deletions src/config/schema.types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ type YamlSchema = {
duration: number
email: CashoutEmail
}
topup: {
enabled: boolean
}
sendgrid: SendGridConfig
frappe: FrappeConfig
fcmTopics: {
Expand Down
4 changes: 4 additions & 0 deletions src/config/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ export const Cashout = {
},
}

export const Topup = {
Enabled: (yamlConfig.topup?.enabled ?? false) as boolean,
}

export const SendGridConfig = yamlConfig.sendgrid as SendGridConfig

export const IbexConfig = yamlConfig.ibex as IbexConfig
Expand Down
2 changes: 2 additions & 0 deletions src/graphql/public/root/query/globals.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
NETWORK,
Topup,
getFeesConfig,
getGaloyBuildInformation,
getLightningAddressDomain,
Expand Down Expand Up @@ -33,6 +34,7 @@ const GlobalsQuery = GT.Field({
ratio: `${feesConfig.depositRatioAsBasisPoints}`,
},
},
topupEnabled: Topup.Enabled,
}
},
})
Expand Down
7 changes: 7 additions & 0 deletions src/graphql/public/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,13 @@

"""A list of countries and their supported auth channels"""
supportedCountries: [Country!]!

"""
Whether wallet top-up entry points (card webview and
bank-transfer-to-support) should be shown to the user. Controlled by the
instance-wide topup feature flag.
"""
topupEnabled: Boolean!

Check notice on line 632 in src/graphql/public/schema.graphql

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Field 'topupEnabled' was added to object type 'Globals'

Field 'topupEnabled' was added to object type 'Globals'

Check notice on line 632 in src/graphql/public/schema.graphql

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Field 'Globals.topupEnabled' has description 'Whether wallet top-up entry points (card webview and bank-transfer-to-support) should be shown to the user. Controlled by the instance-wide topup feature flag.'

Field 'Globals.topupEnabled' has description 'Whether wallet top-up entry points (card webview and bank-transfer-to-support) should be shown to the user. Controlled by the instance-wide topup feature flag.'
}

type GraphQLApplicationError implements Error {
Expand Down
6 changes: 6 additions & 0 deletions src/graphql/public/types/object/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ const Globals = GT.Object({
feesInformation: {
type: GT.NonNull(FeesInformation),
},
topupEnabled: {
type: GT.NonNull(GT.Boolean),
description: dedent`Whether wallet top-up entry points (card webview and
bank-transfer-to-support) should be shown to the user. Controlled by the
instance-wide topup feature flag.`,
},
}),
})

Expand Down
Loading