No funded issue found.
Check out the Issue Explorer
Be the OSS Funding you wish to see in the world.
Looking to fund some work? You can submit a new Funded Issue here .
Time left
Opened
Issue Type
Workers Auto Approve
Project Type
Time Commitment
Experience Level
Permissions
Accepted
Reserved For
Make options for `.signAsync` optional
polkadot-js
polkadot-js, typescript, javascript
### Goal:
Update `signAsync` to make the second argument optional, and default to `{}`
### Background:
Currently this code will crash:
`const signed = await api.system.remark().signAsync(pair, options);` when `options` is `undefined`, it gives this error
```
(node:78914) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'nonce' of undefined
at Submittable.value (/Users/xiliangchen/projects/playground/node_modules/@polkadot/api/submittable/createClass.js:59:42)
at Submittable.value (/Users/xiliangchen/projects/playground/node_modules/@polkadot/api/submittable/createClass.js:129:99)
at /Users/xiliangchen/projects/playground/node_modules/@polkadot/api/submittable/createClass.js:251:110
at /Users/xiliangchen/projects/playground/node_modules/@polkadot/api/promise/Api.js:78:14
at Submittable.signAsync (/Users/xiliangchen/projects/playground/node_modules/@polkadot/api/submittable/createClass.js:251:170)
at /Users/xiliangchen/projects/playground/index.ts:28:33
at step (/Users/xiliangchen/projects/playground/index.ts:33:23)
at Object.next (/Users/xiliangchen/projects/playground/index.ts:14:53)
at /Users/xiliangchen/projects/playground/index.ts:8:71
at new Promise ()
```
### Actions:
Make second argument optional
https://github.com/polkadot-js/api/blob/e77050b9f59a0b772d1d0b8c5c1da488a7c36810/packages/api/src/submittable/createClass.ts#L72
Update interface
https://github.com/polkadot-js/api/blob/e77050b9f59a0b772d1d0b8c5c1da488a7c36810/packages/api/src/submittable/types.ts#L55
Provide appropriate unit tests.
----
@jacogr please tag this if you are happy about this.
Tags:
`bounty-awaiting-approval`
`bounty-XS`
Setup your profile
Tell us a little about you:
Skills
No results found for [[search]] .
Type to search skills..
Bio Required
[[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Next
Setup your profile
Our tools are based on the principles of earn (💰), learn (📖), and meet (💬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Back
Next
Save
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email:
Email
Back
Save