You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type of the output of getXcmWeight() seems to be the same as those from paymentInfo(), but the console.log behavior is different from the original. They can’t be printed with variableName.toJSON(). We need to stick with the original Weight type definition as much as possible. Maybe the output needs to be defined as type WeightV2 in polkadot.js?
const { encodedCallWeight, overallWeight } = await astarAdapter.getXcmWeight(taskPayloadExtrinsic, keyringPair.address, oakTransactXcmInstructionCount);
console.log('encodedCallWeight.toJSON()', encodedCallWeight.toJSON());
> TypeError: encodedCallWeight.toJSON is not a function
The text was updated successfully, but these errors were encountered:
The type of the output of
getXcmWeight()
seems to be the same as those frompaymentInfo()
, but the console.log behavior is different from the original. They can’t be printed with variableName.toJSON(). We need to stick with the original Weight type definition as much as possible. Maybe the output needs to be defined as typeWeightV2
in polkadot.js?Code Reference:
https://github.com/OAK-Foundation/oak.js/blob/764b69ebdc1e82e6c3a8c5f2f3e3c5b1dccfaae1/packages/adapter/src/chains/astar.ts#L56C5-L56C10
Expected
The weight type should be printable with a toJSON() method
Actual
The text was updated successfully, but these errors were encountered: