Skip to content

Commit

Permalink
Don't batch a single call (#1184)
Browse files Browse the repository at this point in the history
* Don't batch a single call

* Ubstoppable grants background

* Min staking amount warning condition fix

* Code review update

* Category title padding fix
  • Loading branch information
bobo-k2 authored Feb 14, 2024
1 parent 378bee2 commit 16f54dd
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
Binary file added src/staking-v3/assets/category_unstoppable.webp
Binary file not shown.
1 change: 1 addition & 0 deletions src/staking-v3/components/Dapps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export default defineComponent({
tooling: require('/src/staking-v3/assets/category_blue.webp'),
utility: require('/src/staking-v3/assets/category_sky.webp'),
others: require('/src/staking-v3/assets/category_green.webp'),
'unstoppable-grants': require('/src/staking-v3/assets/category_unstoppable.webp'),
};
return {
Expand Down
1 change: 0 additions & 1 deletion src/staking-v3/components/DiscoverV3.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import LeaderboardVote from './leaderboard/LeaderboardVote.vue';
import DynamicAdsArea from './DynamicAdsArea.vue';
import ToggleButtons from './ToggleButtons.vue';
import DataList from './data/DataList.vue';
import RegisterBanner from './RegisterBanner.vue';
import { useDappStaking } from '../hooks';
export default defineComponent({
Expand Down
2 changes: 1 addition & 1 deletion src/staking-v3/components/styles/dapps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
.title--category {
width: 60%;
backdrop-filter: blur(20px);
padding: 24px;
padding: 18px;
background-color: rgba(255, 255, 255, 0.05);
color: white;
font-size: 24px;
Expand Down
3 changes: 2 additions & 1 deletion src/staking-v3/hooks/useDappStaking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ export function useDappStaking() {
return [false, t('stakingV3.dappStaking.TooManyStakedContracts')];
} else if (
constants.value?.minStakeAmountToken &&
stake.amount < constants.value.minStakeAmountToken
stake.amount < constants.value.minStakeAmountToken &&
stakerInfo.value?.get(stake.address.toLowerCase()) === undefined
) {
return [
false,
Expand Down
2 changes: 1 addition & 1 deletion src/staking-v3/logic/repositories/DappStakingRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

public async getCurrentEraInfo(): Promise<EraInfo> {
Expand Down

0 comments on commit 16f54dd

Please sign in to comment.