Skip to content

Commit

Permalink
Merge branch 'hackathon' into master-arbitrum
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubcolony committed Jun 26, 2024
2 parents 4b3080d + 9ea7e2d commit ce33a9f
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ const checkKYCHandler = async (
const hasLiquidationAddress =
colonyUser.liquidationAddresses.items.length > 0;

console.log(colonyUser.liquidationAddresses[0]);

if (firstAccount && !hasLiquidationAddress) {
// They have external accounts. Create a liquidation address
const liquidationAddressCreation = await fetch(
Expand All @@ -157,13 +155,14 @@ const checkKYCHandler = async (
if (liquidationAddressCreation.status === 200) {
const liquidationAddressCreationRes =
await liquidationAddressCreation.json();
console.log(liquidationAddressCreationRes);
const liquidationAddress = liquidationAddressCreationRes.address;

await graphqlRequest(
console.log(liquidationAddress, checksummedWalletAddress);
const r = await graphqlRequest(
createLiquidationAddress,
{
input: {
chainId: '42161',
chainId: 42161,
liquidationAddress,
userAddress: checksummedWalletAddress,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@ export const BankDetailsModal: FC<BankDetailsModalProps> = ({
lastName,
taxIdNumber,
email,
currency: 'eur',
iban: {
// eslint-disable-next-line camelcase
account_number: '12345',
bic: 'bicbic',
country: 'GBR',
},
address: {
city,
country,
Expand Down
24 changes: 21 additions & 3 deletions src/graphql/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8926,6 +8926,8 @@ export type UpdateBridgeCustomerMutationVariables = Exact<{
taxIdNumber: Scalars['String'];
signedAgreementId: Scalars['String'];
email: Scalars['String'];
currency: Scalars['String'];
iban?: InputMaybe<BridgeXyzMutationIbanInput>;
}>;


Expand All @@ -8934,7 +8936,7 @@ export type UpdateBridgeCustomerMutation = { __typename?: 'Mutation', bridgeXYZM
export type CheckKycStatusMutationVariables = Exact<{ [key: string]: never; }>;


export type CheckKycStatusMutation = { __typename?: 'Mutation', bridgeXYZMutation?: { __typename?: 'BridgeXYZMutationReturn', kyc_status?: string | null, kyc_link?: string | null, success?: boolean | null } | null };
export type CheckKycStatusMutation = { __typename?: 'Mutation', bridgeXYZMutation?: { __typename?: 'BridgeXYZMutationReturn', kyc_status?: string | null, kyc_link?: string | null, success?: boolean | null, country?: string | null, bankAccount?: { __typename?: 'BridgeXYZBankAccount', currency: string, bankName: string, iban?: { __typename?: 'BridgeXYZIbanBankAccount', bic: string, country: string, last4: string } | null, usAccount?: { __typename?: 'BridgeXYZUSBankAccount', last4: string, routingNumber: string } | null } | null } | null };

export type CreateColonyEtherealMetadataMutationVariables = Exact<{
input: CreateColonyEtherealMetadataInput;
Expand Down Expand Up @@ -10562,9 +10564,9 @@ export type CreateKycLinksMutationHookResult = ReturnType<typeof useCreateKycLin
export type CreateKycLinksMutationResult = Apollo.MutationResult<CreateKycLinksMutation>;
export type CreateKycLinksMutationOptions = Apollo.BaseMutationOptions<CreateKycLinksMutation, CreateKycLinksMutationVariables>;
export const UpdateBridgeCustomerDocument = gql`
mutation UpdateBridgeCustomer($firstName: String!, $lastName: String!, $address: BridgeXYZMutationAddressInput, $birthDate: String!, $taxIdNumber: String!, $signedAgreementId: String!, $email: String!) {
mutation UpdateBridgeCustomer($firstName: String!, $lastName: String!, $address: BridgeXYZMutationAddressInput, $birthDate: String!, $taxIdNumber: String!, $signedAgreementId: String!, $email: String!, $currency: String!, $iban: BridgeXYZMutationIbanInput) {
bridgeXYZMutation(
input: {path: "v0/customers/{customerID}", body: {first_name: $firstName, last_name: $lastName, address: $address, birth_date: $birthDate, tax_identification_number: $taxIdNumber, signed_agreement_id: $signedAgreementId, email: $email}}
input: {path: "v0/customers/{customerID}", body: {first_name: $firstName, last_name: $lastName, address: $address, birth_date: $birthDate, tax_identification_number: $taxIdNumber, signed_agreement_id: $signedAgreementId, email: $email, currency: $currency, iban: $iban}}
) {
success
}
Expand Down Expand Up @@ -10592,6 +10594,8 @@ export type UpdateBridgeCustomerMutationFn = Apollo.MutationFunction<UpdateBridg
* taxIdNumber: // value for 'taxIdNumber'
* signedAgreementId: // value for 'signedAgreementId'
* email: // value for 'email'
* currency: // value for 'currency'
* iban: // value for 'iban'
* },
* });
*/
Expand All @@ -10608,6 +10612,20 @@ export const CheckKycStatusDocument = gql`
kyc_status
kyc_link
success
country
bankAccount {
currency
bankName
iban {
bic
country
last4
}
usAccount {
last4
routingNumber
}
}
}
}
`;
Expand Down
18 changes: 18 additions & 0 deletions src/graphql/mutations/bridgeXYZ.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ mutation UpdateBridgeCustomer(
$taxIdNumber: String!
$signedAgreementId: String!
$email: String!
$currency: String!
$iban: BridgeXYZMutationIbanInput
) {
bridgeXYZMutation(
input: {
Expand All @@ -54,6 +56,8 @@ mutation UpdateBridgeCustomer(
tax_identification_number: $taxIdNumber
signed_agreement_id: $signedAgreementId
email: $email
currency: $currency
iban: $iban
}
}
) {
Expand All @@ -66,5 +70,19 @@ mutation CheckKYCStatus {
kyc_status
kyc_link
success
country
bankAccount {
currency
bankName
iban {
bic
country
last4
}
usAccount {
last4
routingNumber
}
}
}
}

0 comments on commit ce33a9f

Please sign in to comment.