Skip to content

Commit ea3bb33

Browse files
authored
Fix muralpay pix payouts in backend (#5463)
* Fix fields for pix payout * Fix muralpay pix backend --------- Co-authored-by: Creeperkatze <178587183+Creeperkatze@users.noreply.github.com>
1 parent 024e079 commit ea3bb33

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

apps/frontend/src/locales/en-US/index.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,9 +1793,6 @@
17931793
"muralpay.field.bank-account-number": {
17941794
"message": "Account number"
17951795
},
1796-
"muralpay.field.branch-code": {
1797-
"message": "Branch code"
1798-
},
17991796
"muralpay.field.clabe": {
18001797
"message": "CLABE"
18011798
},
@@ -1826,6 +1823,9 @@
18261823
"muralpay.field.pix-phone": {
18271824
"message": "PIX phone"
18281825
},
1826+
"muralpay.field.random-key": {
1827+
"message": "Random key"
1828+
},
18291829
"muralpay.field.routing-number": {
18301830
"message": "Routing number"
18311831
},
@@ -1886,9 +1886,6 @@
18861886
"muralpay.placeholder.enter-account-number": {
18871887
"message": "Enter account number"
18881888
},
1889-
"muralpay.placeholder.enter-branch-code": {
1890-
"message": "Enter branch code"
1891-
},
18921889
"muralpay.placeholder.enter-clabe": {
18931890
"message": "Enter 18-digit CLABE"
18941891
},
@@ -1901,6 +1898,9 @@
19011898
"muralpay.placeholder.enter-pix-email": {
19021899
"message": "Enter PIX email"
19031900
},
1901+
"muralpay.placeholder.enter-random-key": {
1902+
"message": "Enter random key"
1903+
},
19041904
"muralpay.placeholder.enter-routing-number": {
19051905
"message": "Enter 9-digit routing number"
19061906
},

apps/frontend/src/utils/muralpay-rails.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,14 @@ export const MURALPAY_RAILS: Record<string, RailConfig> = {
357357
{
358358
name: 'branchCode',
359359
type: 'text',
360-
label: defineMessage({ id: 'muralpay.field.branch-code', defaultMessage: 'Branch code' }),
360+
label: defineMessage({
361+
id: 'muralpay.field.random-key',
362+
defaultMessage: 'Random key',
363+
}),
361364
required: true,
362365
placeholder: defineMessage({
363-
id: 'muralpay.placeholder.enter-branch-code',
364-
defaultMessage: 'Enter branch code',
366+
id: 'muralpay.placeholder.enter-random-key',
367+
defaultMessage: 'Enter random key',
365368
}),
366369
autocomplete: 'off',
367370
dependsOn: {
@@ -383,10 +386,6 @@ export const MURALPAY_RAILS: Record<string, RailConfig> = {
383386
defaultMessage: 'Brazilian tax identification number',
384387
}),
385388
autocomplete: 'off',
386-
dependsOn: {
387-
field: 'pixAccountType',
388-
value: 'DOCUMENT',
389-
},
390389
},
391390
],
392391
},

packages/muralpay/src/payout.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,12 @@ pub enum FiatAndRailDetails {
554554
Brl {
555555
symbol: BrlSymbol,
556556
pix_account_type: PixAccountType,
557-
pix_email: String,
558-
pix_phone: String,
559-
branch_code: String,
557+
#[serde(default, skip_serializing_if = "Option::is_none")]
558+
pix_email: Option<String>,
559+
#[serde(default, skip_serializing_if = "Option::is_none")]
560+
pix_phone: Option<String>,
561+
#[serde(default, skip_serializing_if = "Option::is_none")]
562+
branch_code: Option<String>,
560563
document_number: String,
561564
},
562565
#[serde(rename_all = "camelCase")]

0 commit comments

Comments
 (0)