netgum / archanova

Archanova monorepo
https://archanova.io/
19 stars 11 forks source link

estimateAccountDeployment gives me a BadRequest #54

Closed morelazers closed 5 years ago

morelazers commented 5 years ago

On develop branch preview

const gasPriceStrategy = sdkConstants.GasPriceStrategies.Avg
let sdkEnv = getSdkEnvironment(SdkEnvironmentNames.Kovan)
let sdk = new createSdk(sdkEnv)
/* initialise and connect to existing account */

// this line throws an error
const estimate = await sdk.estimateAccountDeployment(gasPriceStrategy)

// this is returned from the server
errors: { gasPrice: 'any.required' } }

Connected account: 0xbC4Fd6EAe7c876b5fdD0161AaF3a30e79406C04f

morelazers commented 5 years ago

Adding this: console.log({accountAddress, gasPriceStrategy}) inside Sdk.estimateAccountDeployment shows me the correct address and gasPriceStrategy, however logging the same inside the ApiMethods file gives me the accountAddress twice.

A real bamboozle.

morelazers commented 5 years ago

My bad - wasn't initialising the SDK with the Preview env