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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const bridgeAddExternalAccount = GT.Field({
return { errors: [mapAndParseErrorForGqlResponse(new BridgeDisabledError())] }
}

if (!domainAccount || domainAccount.level < 2) {
if (!domainAccount || domainAccount.level <= 0) {
return { errors: [mapAndParseErrorForGqlResponse(new BridgeAccountLevelError())] }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const bridgeCreateVirtualAccount = GT.Field({
return { errors: [mapAndParseErrorForGqlResponse(new BridgeDisabledError())] }
}

if (!domainAccount || domainAccount.level < 2) {
if (!domainAccount || domainAccount.level <= 0) {
return { errors: [mapAndParseErrorForGqlResponse(new BridgeAccountLevelError())] }
}

Expand Down
2 changes: 1 addition & 1 deletion src/graphql/public/root/mutation/bridge-initiate-kyc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const bridgeInitiateKyc = GT.Field({
return { errors: [mapAndParseErrorForGqlResponse(new BridgeDisabledError())] }
}

if (!domainAccount || domainAccount.level < 2) {
if (!domainAccount || domainAccount.level <= 0) {
return { errors: [mapAndParseErrorForGqlResponse(new BridgeAccountLevelError())] }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const bridgeInitiateWithdrawal = GT.Field({
return { errors: [mapAndParseErrorForGqlResponse(new BridgeDisabledError())] }
}

if (!domainAccount || domainAccount.level < 2) {
if (!domainAccount || domainAccount.level <= 0) {
return { errors: [mapAndParseErrorForGqlResponse(new BridgeAccountLevelError())] }
}

Expand Down
2 changes: 1 addition & 1 deletion src/graphql/public/root/query/bridge-virtual-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const bridgeVirtualAccount = GT.Field({

if (!domainAccount) return null

if (domainAccount.level < 2) {
if (domainAccount.level <= 0) {
throw mapAndParseErrorForGqlResponse(new BridgeAccountLevelError())
}

Expand Down
2 changes: 1 addition & 1 deletion src/services/bridge/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class BridgeInsufficientFundsError extends BridgeError {
}

export class BridgeAccountLevelError extends BridgeError {
constructor(message: string = "Bridge requires Pro account (Level 2+)") {
constructor(message: string = "Bridge requires at least a Personal account (Level 1+)") {
super(message)
}
}
Expand Down