onboarding: Cannot find name 'ethereumAddress'
Closed this issue · 2 comments
hp8wvvvgnj6asjm7 commented
const onboardingInformation: {
apiKey: ApiKeyCredentials,
user: UserResponseObject,
account: AccountResponseObject,
} = await client.onboarding.createUser({ starkKey: '', starkKeyYCoordinate: '', country: '' }, ethereumAddress: '');
typescript telling me this.. how is it fixed?
kungla commented
Add context code here that will show how you got this message
shah-smit commented
The contract for create user is .createUser(object, string)
so you cannot put ethereumAddress: ''
in the second param.
Here is the working code::
client.onboarding.createUser(
{
starkKey: starKey.publicKey,
starkKeyYCoordinate: starKey.publicKeyYCoordinate,
country: 'SG'
},
address,
null,
SigningMethod.MetaMask
).then((responseFromNewUser) => {
return new Promise((resolve, reject) => resolve(responseFromNewUser.apiKey))
})