Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9a71097
feat(bridge): split withdrawal into request, confirm, and cancel steps
heyolaniran Jun 5, 2026
1f4db28
docs(bridge): document two-step withdrawal flow in FLOWS and API
heyolaniran Jun 5, 2026
5bfda9f
chore(bruno): add GraphQL requests for bridge withdrawal flow
heyolaniran Jun 5, 2026
e833d76
fix(config): add external_account webhook public key to dev config
heyolaniran Jun 5, 2026
ebbb768
chore(graphql): regenerate supergraph for bridge withdrawal mutations
heyolaniran Jun 5, 2026
0a649b9
fix(bridge): map withdrawal request errors to Bridge codes
heyolaniran Jun 7, 2026
48c63e2
test(bridge): add resolver coverage for request/initiate/cancel withd…
heyolaniran Jun 7, 2026
86aaf7b
fix(bridge): resolve duplicate const declarations in deposit webhook …
heyolaniran Jun 7, 2026
63dafa1
Merge branch 'tmp/bridge-rebase-pr-ready' into request-withdrawal-bef…
heyolaniran Jun 7, 2026
c1c9a28
fix(graphql): align BridgeWithdrawal type with new id/status contract
heyolaniran Jun 7, 2026
9e5c8f2
test(bridge): cover getWithdrawals mapping to id/status/bridgeTransferId
heyolaniran Jun 7, 2026
5ebaf1a
feat(bridge): add submitted status for initiated withdrawals
heyolaniran Jun 7, 2026
f70e205
fix(bridge): restore getWithdrawals filter with correct && operator
heyolaniran Jun 7, 2026
05ace13
fix(graphql): map bridge withdrawal errors through bridgeGqlError
heyolaniran Jun 7, 2026
06c63a7
test(bridge): cover withdrawal request confirm and cancel flow
heyolaniran Jun 7, 2026
d6e5a56
chore(graphql): regenerate schema for withdrawal request flow
heyolaniran Jun 7, 2026
09a8e74
test(bridge): guard getWithdrawals id/status GraphQL contract
heyolaniran Jun 7, 2026
24bb420
chore(bridge): fix surgical lint issues in withdrawal flow
heyolaniran Jun 7, 2026
e204655
chore(bridge): finish withdrawal lint and docs cleanup
forge0x Jun 8, 2026
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
39 changes: 35 additions & 4 deletions dev/apollo-federation/supergraph.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,19 @@ type BridgeAddExternalAccountPayload
externalAccount: BridgeExternalAccountLink
}

input BridgeCancelWithdrawalRequestInput
@join__type(graph: PUBLIC)
{
withdrawalId: ID!
}

type BridgeCancelWithdrawalRequestPayload
@join__type(graph: PUBLIC)
{
errors: [Error!]!
withdrawal: BridgeWithdrawal
}

type BridgeCreateVirtualAccountPayload
@join__type(graph: PUBLIC)
{
Expand Down Expand Up @@ -312,8 +325,7 @@ type BridgeInitiateKycPayload
input BridgeInitiateWithdrawalInput
@join__type(graph: PUBLIC)
{
amount: String!
externalAccountId: ID!
withdrawalId: ID!
}

type BridgeInitiateWithdrawalPayload
Expand All @@ -330,6 +342,20 @@ type BridgeKycLink
tosLink: String!
}

input BridgeRequestWithdrawalInput
@join__type(graph: PUBLIC)
{
amount: String!
externalAccountId: ID!
}

type BridgeRequestWithdrawalPayload
@join__type(graph: PUBLIC)
{
errors: [Error!]!
withdrawal: BridgeWithdrawal
}

type BridgeVirtualAccount
@join__type(graph: PUBLIC)
{
Expand All @@ -348,11 +374,13 @@ type BridgeWithdrawal
@join__type(graph: PUBLIC)
{
amount: String!
bridgeTransferId: String
createdAt: String!
currency: String!
externalAccountId: String
failureReason: String
state: String!
transferId: ID!
id: ID!
status: String!
}

"""
Expand Down Expand Up @@ -1232,9 +1260,11 @@ type Mutation
accountUpdateDefaultWalletId(input: AccountUpdateDefaultWalletIdInput!): AccountUpdateDefaultWalletIdPayload!
accountUpdateDisplayCurrency(input: AccountUpdateDisplayCurrencyInput!): AccountUpdateDisplayCurrencyPayload!
bridgeAddExternalAccount: BridgeAddExternalAccountPayload!
bridgeCancelWithdrawalRequest(input: BridgeCancelWithdrawalRequestInput!): BridgeCancelWithdrawalRequestPayload!
bridgeCreateVirtualAccount: BridgeCreateVirtualAccountPayload!
bridgeInitiateKyc(input: BridgeInitiateKycInput!): BridgeInitiateKycPayload!
bridgeInitiateWithdrawal(input: BridgeInitiateWithdrawalInput!): BridgeInitiateWithdrawalPayload!
bridgeRequestWithdrawal(input: BridgeRequestWithdrawalInput!): BridgeRequestWithdrawalPayload!
businessAccountUpgradeRequest(input: BusinessAccountUpgradeRequestInput!): AccountUpgradePayload!
callbackEndpointAdd(input: CallbackEndpointAddInput!): CallbackEndpointAddPayload!
callbackEndpointDelete(input: CallbackEndpointDeleteInput!): SuccessPayload!
Expand Down Expand Up @@ -1700,6 +1730,7 @@ type Query
bridgeExternalAccounts: [BridgeExternalAccount]
bridgeKycStatus: String
bridgeVirtualAccount: BridgeVirtualAccount
bridgeWithdrawalRequest(id: ID!): BridgeWithdrawal
bridgeWithdrawals: [BridgeWithdrawal]
btcPrice(currency: DisplayCurrency! = "USD"): Price @deprecated(reason: "Deprecated in favor of realtimePrice")
btcPriceList(range: PriceGraphRange!): [PricePoint]
Expand Down
2 changes: 2 additions & 0 deletions dev/bruno/Flash GraphQL API/environments/local.bru
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ vars {
walletIdUsd: c593736e-5a58-42e4-93fa-dc895856c1f1
userEmail: mauriente@gmail.com
userFullName: maurientes
bridgeExternalAccountId:
bridgeWithdrawalId:
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
meta {
name: bridgeCancelWithdrawalRequest
type: graphql
seq: 39
}

post {
url: {{flashGraphqlUrl}}
body: graphql
auth: inherit
}

headers {
Content-Type: application/json
}

body:graphql {
mutation BridgeCancelWithdrawalRequest($input: BridgeCancelWithdrawalRequestInput!) {
bridgeCancelWithdrawalRequest(input: $input) {
errors {
message
}
withdrawal {
id
amount
currency
status
createdAt
}
}
}
}

body:graphql:vars {
{
"input": {
"withdrawalId": "{{bridgeWithdrawalId}}"
}
}
}

settings {
encodeUrl: false
timeout: 30000
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
meta {
name: bridgeInitiateWithdrawal
type: graphql
seq: 38
}

post {
url: {{flashGraphqlUrl}}
body: graphql
auth: inherit
}

headers {
Content-Type: application/json
}

body:graphql {
mutation BridgeInitiateWithdrawal($input: BridgeInitiateWithdrawalInput!) {
bridgeInitiateWithdrawal(input: $input) {
errors {
message
}
withdrawal {
id
amount
currency
status
createdAt
}
}
}
}

body:graphql:vars {
{
"input": {
"withdrawalId": "{{bridgeWithdrawalId}}"
}
}
}

settings {
encodeUrl: false
timeout: 30000
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
meta {
name: bridgeRequestWithdrawal
type: graphql
seq: 37
}

post {
url: {{flashGraphqlUrl}}
body: graphql
auth: inherit
}

headers {
Content-Type: application/json
}

body:graphql {
mutation BridgeRequestWithdrawal($input: BridgeRequestWithdrawalInput!) {
bridgeRequestWithdrawal(input: $input) {
errors {
message
}
withdrawal {
id
amount
currency
externalAccountId
status
createdAt
}
}
}
}

body:graphql:vars {
{
"input": {
"amount": "50.00",
"externalAccountId": "{{bridgeExternalAccountId}}"
}
}
}

settings {
encodeUrl: false
timeout: 30000
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
meta {
name: bridgeWithdrawalRequest
type: graphql
seq: 33
}

post {
url: {{flashGraphqlUrl}}
body: graphql
auth: inherit
}

headers {
Content-Type: application/json
}

body:graphql {
query BridgeWithdrawalRequest($id: ID!) {
bridgeWithdrawalRequest(id: $id) {
id
amount
currency
externalAccountId
status
failureReason
createdAt
}
}
}

body:graphql:vars {
{
"id": "{{bridgeWithdrawalId}}"
}
}

settings {
encodeUrl: false
timeout: 30000
}
Loading