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

Don't batch a single call #1184

Merged
merged 5 commits into from Feb 14, 2024
Merged

Conversation

bobo-k2
Copy link
Contributor

@bobo-k2 bobo-k2 commented Feb 13, 2024

Pull Request Summary
This PR contains the following:

  • fix not to create a batch call for a single transaction
  • background image for unstoppable grants category
  • allow staking amount lower than min. staking amount if user already staked on the dApp

Check list

  • contains breaking changes
  • adds new feature
  • modifies existing feature (bug fix or improvements)
  • relies on other tasks
  • documentation changes
  • tested on mobile devices

Copy link

github-actions bot commented Feb 13, 2024

Visit the preview URL for this PR (updated for commit 64fa8b6):

https://astar-apps--pr1184-fix-dont-batch-singl-rcaxdmgk.web.app

(expires Tue, 20 Feb 2024 18:54:10 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: dd76fe72958fe2910fef9d53f0b4539b82b849db

@@ -397,7 +397,7 @@ export class DappStakingRepository implements IDappStakingRepository {
public async batchAllCalls(calls: ExtrinsicPayload[]): Promise<ExtrinsicPayload> {
const api = await this.api.getApi();

return api.tx.utility.batchAll(calls);
return calls.length == 1 ? calls[0] : api.tx.utility.batchAll(calls);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return calls.length == 1 ? calls[0] : api.tx.utility.batchAll(calls);
return calls.length === 1 ? calls[0] : api.tx.utility.batchAll(calls);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed in f0b1042

@Kahonnohak
Copy link
Contributor

@bobo-k2 could we add unstoppable image on this PR?

Copy link
Contributor

@gluneau gluneau left a comment

Choose a reason for hiding this comment

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

It works.

Copy link
Contributor

@Kahonnohak Kahonnohak left a comment

Choose a reason for hiding this comment

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

LGTM

@bobo-k2 bobo-k2 merged commit 16f54dd into release-hotfix Feb 14, 2024
5 of 6 checks passed
@bobo-k2 bobo-k2 deleted the fix/dont-batch-single-call branch February 14, 2024 07:24
impelcrypto pushed a commit that referenced this pull request Feb 16, 2024
* Enable dApp staking v3 on Astar (#1182)

* Add text ellipsis to the dApp cards (#1186)

* add text ellipsis to the dapp card

* update

* Revert "update"

This reverts commit 29c7d3f.

* fix the arrow style of the ads section

* fix builders card layout

* fix dapp page short description

* Don't batch a single call (#1184)

* Don't batch a single call

* Ubstoppable grants background

* Min staking amount warning condition fix

* Code review update

* Category title padding fix

* Fix for min staking amount warning (#1191)

---------

Co-authored-by: Ayumi Takahashi <ayumee528@gmail.com>
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.

None yet

4 participants