Skip to content
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

Misc improvements #282

Merged
merged 7 commits into from
Aug 5, 2022
Merged

Misc improvements #282

merged 7 commits into from
Aug 5, 2022

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Aug 5, 2022

Fixes "invalid nonce" part of #153

@@ -755,7 +755,9 @@ class APIService {
const tw = oasis.staking.allowWrapper()
params.method = TRANSACTION_TYPE.StakingAllow
params.toAddress = oasis.staking.addressToBech32(await oasis.staking.addressFromRuntimeID(oasis.misc.fromHex(params.runtimeId)))
let result = await this.submitTxBody(params, tw,true,(data)=>this.depositToParatimeAccount(params,resolve,reject,data)).catch(err=>err)
let result = await this.submitTxBody(params, tw, true, (data) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to use curly braces here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference is to have a curly for multiline

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also nice to use braces for statements (even single statements imo) and no braces for expressions

"oasis-xu-frame.html"
]
"web_accessible_resources": ["oasis-xu-frame.html"],
"externally_connectable": { "ids": [] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's a benefit of adding this entry when empty ids array is the same as unspecified externally_connectable manifest key (as long as this theory is true)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty externally_connectable would do the same. But I think this is easier to understand intuitively, without looking at documentation :D
and I can't add a comment

@@ -755,7 +755,9 @@ class APIService {
const tw = oasis.staking.allowWrapper()
params.method = TRANSACTION_TYPE.StakingAllow
params.toAddress = oasis.staking.addressToBech32(await oasis.staking.addressFromRuntimeID(oasis.misc.fromHex(params.runtimeId)))
let result = await this.submitTxBody(params, tw,true,(data)=>this.depositToParatimeAccount(params,resolve,reject,data)).catch(err=>err)
let result = await this.submitTxBody(params, tw, true, (data) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also nice to use braces for statements (even single statements imo) and no braces for expressions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants