-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type for field payload
missing from spend method options
#1791
Comments
Probably it is because you have I've created a new project to reproduce this error using plain typescript ./src/main.ts import { Node, AeSdk, MemoryAccount } from '@aeternity/aepp-sdk';
const node = new Node('https://testnet.aeternity.io');
const aeSdk = new AeSdk({
nodes: [{ name: 'testnet', instance: node }],
accounts: [
new MemoryAccount('9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200'),
],
});
(async () => {
await aeSdk.spend(1, aeSdk.address, { payload: 'ba_test' });
})(); $ npm init
$ npm i typescript@4
$ npx tsc ./src/main.ts --target es2015 --moduleResolution node --allowSyntheticDefaultImports true And it works, but VS code was showing the payload error you have. I've created |
Instead of the warning in the docs, it would be nice to have strict types for the options as we know in real life what are options expected for each method. Anyway, It's nice to have them in the docs, but #1794 wouldn't close this issue. Let's keep this open till the SDK is compatible. |
It is relatively big effort to do, I've opened #1793 to track this issue. |
The third parameter to the
spend
method doesn't accept thepayload
field. Typescript complains.In JS, spend does accept
payload
and I can see the payload string in the explorer.The text was updated successfully, but these errors were encountered: