Skip to content

Commit

Permalink
Release hotfix to main (#1375)
Browse files Browse the repository at this point in the history
* hotfix: enable xcm with Bifrost (#1361)

* Fix ledger on the portal (#1370)

* disable celer bridge (#1353)

* disable cbridge

* fix statement shorter

* disable celer bridge icon too (#1354)

* Fix usePrice hooks (#1355)

* fix usePrice issue

* refactor, just using immediate is enough

* only enable immediate for h160 wallet (#1356)

* Add metadata hash and uplift to polkadot 12.0.1

* Added // @ts-nocheck to ignore some typing errors for now

* More // @ts-nocheck

* WithSignedTransaction

* Remove hash

* $api removed

* fix: removed useLedger and login toggle (#1371)

---------

Co-authored-by: Taegeon Alan Go <[email protected]>
Co-authored-by: Roy <[email protected]>

* Add raw metadata to chain info (#1372)

* Add raw metadata to chain info

* Enable users to update metadata once more event if it is up to date

* Polkadot types errors fix (#1373)

* Fix polkadot types errors

* Be strict

* Polkasafe version update

* Fix for getting dApps (#1374)

---------

Co-authored-by: Roy <[email protected]>
Co-authored-by: Taegeon Alan Go <[email protected]>
  • Loading branch information
3 people authored Aug 21, 2024
1 parent 6555c3f commit 5f0898d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/staking-v3/hooks/useDapps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function useDapps() {

try {
aggregator.publish(new BusyMessage(true));
const dApps = await service.getDapps(currentNetworkName.value.toLowerCase());
const dApps = await service.getDapps();
store.commit('stakingV3/addDapps', dApps.fullInfo);
store.commit('stakingV3/addNewDapps', dApps.chainInfo);
// Memo: this can a heavy operations since we are querying all dapps stakes for a chain.
Expand Down
12 changes: 5 additions & 7 deletions src/staking-v3/logic/services/DappStakingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,13 @@ export class DappStakingService extends SignerService implements IDappStakingSer
}

// @inheritdoc
public async getDapps(
network: string
): Promise<{ fullInfo: CombinedDappInfo[]; chainInfo: DappInfo[] }> {
Guard.ThrowIfUndefined(network, 'network');

public async getDapps(): Promise<{ fullInfo: CombinedDappInfo[]; chainInfo: DappInfo[] }> {
const metadata = await this.metadataRepository.getChainMetadata();
const chain = metadata.chain.toLowerCase();
const [storeDapps, chainDapps, tokenApiDapps] = await Promise.all([
this.dappStakingRepository.getDapps(network.toLowerCase()),
this.dappStakingRepository.getDapps(chain),
this.dappStakingRepository.getChainDapps(),
this.tokenApiRepository.getDapps(network.toLowerCase()),
this.tokenApiRepository.getDapps(chain),
]);

// Map on chain and in store dApps (registered only)
Expand Down
3 changes: 1 addition & 2 deletions src/staking-v3/logic/services/IDappStakingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ import {
export interface IDappStakingService {
/**
* Gets the dapps for the given network.
* @param network Name of the network to get dapps for.
* @returns A map containing full dapps info (chain and firebase data) and chain info (only for new dapps not stored in firebase yet).
*/
getDapps(network: string): Promise<{ fullInfo: CombinedDappInfo[]; chainInfo: DappInfo[] }>;
getDapps(): Promise<{ fullInfo: CombinedDappInfo[]; chainInfo: DappInfo[] }>;

/**
* Invokes claim staker rewards, unstake and unlock calls.
Expand Down

0 comments on commit 5f0898d

Please sign in to comment.