Skip to content

Commit cc6fc96

Browse files
committed
Prepopulate Infinite KYC form (as much as possible)
1 parent 75b9b83 commit cc6fc96

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/plugins/ramps/infinite/infiniteApiTypes.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ export const asInfiniteCustomerRequest = asObject({
139139
lastName: asString
140140
})
141141
),
142+
address: asOptional(
143+
asObject({
144+
addressLine1: asString,
145+
addressLine2: asOptional(asString),
146+
city: asString,
147+
state: asString,
148+
postalCode: asString,
149+
country: asString
150+
})
151+
),
142152
companyInformation: asOptional(
143153
asObject({
144154
legalName: asString,

src/plugins/ramps/infinite/workflows/kycWorkflow.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ export const kycWorkflow = async (params: Params): Promise<void> => {
7979
firstName: contactInfo.firstName,
8080
lastName: contactInfo.lastName
8181
},
82+
address: {
83+
addressLine1: contactInfo.address1,
84+
addressLine2: contactInfo.address2,
85+
city: contactInfo.city,
86+
state: contactInfo.state,
87+
postalCode: contactInfo.postalCode,
88+
country: countryCode
89+
},
8290
companyInformation: undefined
8391
})
8492
.catch((error: unknown) => {

0 commit comments

Comments
 (0)