Skip to content

Commit

Permalink
Merge branch 'chore/enable-coreum' into 'develop'
Browse files Browse the repository at this point in the history
chore/enable-coreum

See merge request papers/airgap/airgap-wallet!648
  • Loading branch information
godenzim committed Mar 21, 2023
2 parents 7f41c01 + 82d8e87 commit eec9031
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 217 deletions.
2 changes: 0 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ publish-web-dev:
when: manual
only:
- develop
- release/3.24.0
needs:
- build-web

Expand All @@ -201,7 +200,6 @@ deploy-web-dev:
when: manual
only:
- develop
- release/3.24.0
script:
- find k8s -type f -name \*.yaml -exec sed -i "s|__NAMESPACE__|"$NAMESPACE"|g" {} +
- find k8s -type f -name \*.yaml -exec sed -i "s|__CI_PROJECT_NAME__|"$CI_PROJECT_NAME"|g" {} +
Expand Down
304 changes: 152 additions & 152 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,27 @@
}
},
"dependencies": {
"@airgap/aeternity": "0.13.11",
"@airgap/angular-core": "0.0.35",
"@airgap/angular-ngrx": "0.0.35",
"@airgap/astar": "0.13.11",
"@airgap/aeternity": "0.13.12",
"@airgap/angular-core": "0.0.36",
"@airgap/angular-ngrx": "0.0.36",
"@airgap/astar": "0.13.12",
"@airgap/beacon-sdk": "3.1.5-beta.0",
"@airgap/bitcoin": "0.13.11",
"@airgap/coinlib-core": "0.13.11",
"@airgap/coreum": "0.13.11",
"@airgap/cosmos": "0.13.11",
"@airgap/cosmos-core": "0.13.11",
"@airgap/crypto": "0.13.11",
"@airgap/ethereum": "0.13.11",
"@airgap/groestlcoin": "0.13.11",
"@airgap/icp": "0.13.11",
"@airgap/module-kit": "0.13.11",
"@airgap/moonbeam": "0.13.11",
"@airgap/polkadot": "0.13.11",
"@airgap/bitcoin": "0.13.12",
"@airgap/coinlib-core": "0.13.12",
"@airgap/coreum": "0.13.12",
"@airgap/cosmos": "0.13.12",
"@airgap/cosmos-core": "0.13.12",
"@airgap/crypto": "0.13.12",
"@airgap/ethereum": "0.13.12",
"@airgap/groestlcoin": "0.13.12",
"@airgap/icp": "0.13.12",
"@airgap/module-kit": "0.13.12",
"@airgap/moonbeam": "0.13.12",
"@airgap/polkadot": "0.13.12",
"@airgap/sapling-wasm": "0.0.7",
"@airgap/serializer": "0.13.11",
"@airgap/substrate": "0.13.11",
"@airgap/tezos": "0.13.11",
"@airgap/serializer": "0.13.12",
"@airgap/substrate": "0.13.12",
"@airgap/tezos": "0.13.12",
"@angular/animations": "^11.2.9",
"@angular/common": "^11.2.9",
"@angular/core": "^11.2.9",
Expand Down
3 changes: 2 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
ZIP_PLUGIN
} from '@airgap/angular-core'
import { AirGapAngularNgRxModule, currencySymbolNgRxFacade } from '@airgap/angular-ngrx'
import { CoreumModule } from '@airgap/coreum'
import { ICPModule } from '@airgap/icp'
import { CommonModule, DecimalPipe, PercentPipe } from '@angular/common'
import { HttpClient, HttpClientModule } from '@angular/common/http'
Expand Down Expand Up @@ -153,7 +154,7 @@ export function createTranslateLoader(http: HttpClient): AirGapTranslateLoader {
{ provide: SPLASH_SCREEN_PLUGIN, useValue: SplashScreen },
{ provide: STATUS_BAR_PLUGIN, useValue: StatusBar },
{ provide: APP_CONFIG, useValue: appConfig },
{ provide: ISOLATED_MODULES_PLUGIN, useValue: new WebIsolatedModules([new ICPModule()]) },
{ provide: ISOLATED_MODULES_PLUGIN, useValue: new WebIsolatedModules([new ICPModule(), new CoreumModule()]) },
{ provide: ZIP_PLUGIN, useValue: Zip },
DecimalPipe,
ShortenStringPipe,
Expand Down
29 changes: 0 additions & 29 deletions src/app/extensions/delegation/TezosDelegationExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,35 +253,6 @@ export class TezosDelegationExtensions extends V0ProtocolDelegationExtensions<Te
: null
}

// private async createDelegatorDisplayRewards(
// protocol: TezosProtocol,
// address: string,
// delegatorExtraInfo: DelegationInfo
// ): Promise<UIRewardList | undefined> {
// if (!delegatorExtraInfo.isDelegated || !delegatorExtraInfo.value) {
// return undefined
// }
// const rewardInfo = await protocol.getDelegationRewards(delegatorExtraInfo.value, address)

// return new UIRewardList({
// rewards: await Promise.all(
// rewardInfo.map(async (info) => {
// return {
// index: info.cycle,
// amount: await this.amountConverterPipe.transform(new BigNumber(info.reward), {
// protocol
// }),
// collected: info.payout < new Date(),
// timestamp: info.payout.getTime()
// }
// })
// ),
// indexColLabel: 'delegation-detail-tezos.rewards.index-col_label',
// amountColLabel: 'delegation-detail-tezos.rewards.amount-col_label',
// payoutColLabel: 'delegation-detail-tezos.rewards.payout-col_label'
// })
// }

private async getKnownBakers(): Promise<TezosBakerCollection> {
if (this.knownBakers === undefined) {
this.knownBakers = await this.coinlibService.getKnownTezosBakers()
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/exchange/exchange.changenow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export class ChangeNowExchange extends ChangeNowApi implements Exchange {
}

public async getAvailableToCurrenciesForCurrency(fromCurrency: ProtocolSymbols): Promise<ProtocolSymbols[]> {
const transformedFromCurrency: ExchangeIdentifier = this.convertAirGapIdentifierToExchangeIdentifier([fromCurrency])[0]
const transformedFromCurrency: ExchangeIdentifier = this.convertAirGapIdentifierToExchangeIdentifier([fromCurrency])[0].toLowerCase()

const result: CurrencyDetailResponse[] = await this.http
.get<CurrencyDetailResponse[]>(`${this.baseURL}/currencies-to/${transformedFromCurrency}`)
Expand Down
26 changes: 13 additions & 13 deletions src/app/services/extensions/extensions.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AddressService, AmountConverterPipe, ICoinDelegateProtocolAdapter, ProtocolService } from '@airgap/angular-core'
import { ICoinDelegateProtocol, ProtocolSymbols } from '@airgap/coinlib-core'
import { ICoinDelegateProtocol, MainProtocolSymbols, ProtocolSymbols } from '@airgap/coinlib-core'
import { CosmosProtocol } from '@airgap/cosmos'
import { MoonbaseProtocol, MoonbeamProtocol, MoonriverProtocol } from '@airgap/moonbeam'
import { KusamaProtocol, PolkadotProtocol } from '@airgap/polkadot'
Expand All @@ -8,7 +8,7 @@ import { DecimalPipe } from '@angular/common'
import { Injectable } from '@angular/core'
import { FormBuilder } from '@angular/forms'
import { TranslateService } from '@ngx-translate/core'
// import { CoreumDelegationExtensions } from 'src/app/extensions/delegation/CoreumDelegationExtensions'
import { CoreumDelegationExtensions } from 'src/app/extensions/delegation/CoreumDelegationExtensions'

import { CosmosDelegationExtensions } from '../../extensions/delegation/CosmosDelegationExtensions'
import { MoonbeamDelegationExtensions } from '../../extensions/delegation/MoonbeamDelegationExtensions'
Expand Down Expand Up @@ -86,17 +86,17 @@ export class ExtensionsService {
]

private readonly v1Extensions: [ProtocolSymbols, () => Promise<V1ProtocolDelegationExtensions<any>>][] = [
// [
// MainProtocolSymbols.COREUM,
// async () =>
// CoreumDelegationExtensions.create(
// this.formBuilder,
// this.decimalPipe,
// this.amountConverterPipe,
// this.shortenStringPipe,
// this.translateService
// )
// ]
[
MainProtocolSymbols.COREUM,
async () =>
CoreumDelegationExtensions.create(
this.formBuilder,
this.decimalPipe,
this.amountConverterPipe,
this.shortenStringPipe,
this.translateService
)
]
]

public constructor(
Expand Down
3 changes: 3 additions & 0 deletions src/assets/workers/airgap-coin-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const getProtocolByIdentifier = async (identifier) => {

self.onmessage = (event) => {
const wallets = event.data
if (wallets.map === undefined) {
return;
}

Promise.all(
wallets.map(async (wallet) => {
Expand Down

0 comments on commit eec9031

Please sign in to comment.