Skip to content

Commit

Permalink
Merge pull request #430 from soramitsu/release/1.0.25_1
Browse files Browse the repository at this point in the history
squash adar-dev
  • Loading branch information
timofeytrepalin authored Sep 10, 2024
2 parents 7ccd46f + e9825b1 commit 3ec229f
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 199 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"@types/jsdom": "^21.1.7",
"@types/lodash": "^4.17.6",
"@types/node": "^20.14.10",
"@types/telegram-web-app": "^7.3.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vue/cli-plugin-babel": "5.0.8",
Expand Down
5 changes: 0 additions & 5 deletions public/marketing.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
"img": "/marketing/polkaswap.png",
"link": "https://about.polkaswap.io"
},
{
"title": "NOW IN TELEGRAM",
"img": "/marketing/now_in_telegram.png",
"link": "https://t.me/polkaswap_io_bot/app"
},
{
"title": "SORA",
"img": "/marketing/soraV3.png",
Expand Down
8 changes: 3 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
</notification-enabling-page>
<alerts />
<confirm-dialog
:class="googleDialogZIndex"
:get-api="getApi"
:chain-api="chainApi"
:account="account"
:visibility="isSignTxDialogVisible"
Expand Down Expand Up @@ -78,7 +76,7 @@ import { action, getter, mutation, state } from '@/store/decorators';
import { getMobileCssClasses, preloadFontFace, updateDocumentTitle } from '@/utils';
import type { NodesConnection } from '@/utils/connection';
import { calculateStorageUsagePercentage, clearLocalStorage } from '@/utils/storage';
import { tmaSdkService } from '@/utils/telegram';
// import { tmaSdkService } from '@/utils/telegram';
import { AdarPageNames } from './modules/ADAR/consts';
import { RecipientStatus, SwapTransferBatchStatus, TransactionInfo } from './store/routeAssets/types';
Expand Down Expand Up @@ -258,7 +256,7 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
}
// To start running as Telegram Web App (desktop capabilities)
tmaSdkService.init(data?.TG_BOT_URL);
// tmaSdkService.init(data?.TG_BOT_URL);
await this.setApiKeys(data?.API_KEYS);
// __________ADAR______________________________________________________
Expand Down Expand Up @@ -388,7 +386,7 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
async beforeDestroy(): Promise<void> {
window.removeEventListener('localStorageUpdated', this.handleLocalStorageChange);
window.removeEventListener('resize', this.setResponsiveClassDebounced);
tmaSdkService.destroy();
// tmaSdkService.destroy();
await this.resetInternalSubscriptions();
await this.resetNetworkSubscriptions();
this.resetBlockNumberSubscription();
Expand Down
4 changes: 2 additions & 2 deletions src/components/App/Header/AppHeaderMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { Component, Mixins } from 'vue-property-decorator';

import TranslationMixin from '@/components/mixins/TranslationMixin';
import { getter, mutation, state } from '@/store/decorators';
import { tmaSdkService } from '@/utils/telegram';
// import { tmaSdkService } from '@/utils/telegram';

import type { Currency } from '@soramitsu/soraneo-wallet-web/lib/types/currency';

Expand Down Expand Up @@ -186,7 +186,7 @@ export default class AppHeaderMenu extends Mixins(TranslationMixin) {
case HeaderMenuType.Theme:
await switchTheme();
await this.$nextTick();
tmaSdkService.updateTheme();
// tmaSdkService.updateTheme();
break;
case HeaderMenuType.Language:
this.setLanguageDialogVisibility(true);
Expand Down
31 changes: 0 additions & 31 deletions src/indexer/queries/burnXor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,37 +155,6 @@ const getSubsquidXorBurnQuery = (address?: string) => gql<ConnectionQueryRespons
}
`;

const SubsquidXorBurnQuery = gql<ConnectionQueryResponse<HistoryElement>>`
query XorBurnQuery($start: Int = 0, $end: Int = 0, $after: String = null, $first: Int = 100) {
data: historyElementsConnection(
orderBy: id_ASC
first: $first
after: $after
where: {
AND: [
{ blockHeight_gte: $start }
{ blockHeight_lte: $end }
{ module_eq: "assets" }
{ method_eq: "burn" }
{ data_jsonContains: { assetId: "0x0200000000000000000000000000000000000000000000000000000000000000" } }
]
}
) {
pageInfo {
hasNextPage
endCursor
}
edges {
node {
address
data
blockHeight
}
}
}
}
`;

const parse = (item: HistoryElement): XorBurn => {
const data = item.data as HistoryElementAssetBurn;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export default class ReviewDetails extends Mixins(mixins.TransactionMixin, mixin
@getter.routeAssets.isLiquidityUnavailable isLiquidityUnavailable!: boolean;
@getter.wallet.account.assetsDataTable private assetsDataTable!: WALLET_TYPES.AssetsTable;
@getter.routeAssets.adarSwapEnabled adarSwapEnabled!: boolean;
@getter.routeAssets.transferTokenBalance transferTokenBalance!: (address: string | undefined) => FPNumber;
showSwapDialog = false;
showSelectInputAssetDialog = false;
Expand Down Expand Up @@ -310,8 +311,7 @@ export default class ReviewDetails extends Mixins(mixins.TransactionMixin, mixin
}
tokenTransferAmountRequired(asset: Asset, requiredValue: FPNumber) {
const userAssetBalanceString = this.getTokenBalance(asset);
const userAssetBalance = FPNumber.fromCodecValue(userAssetBalanceString, asset.decimals);
const userAssetBalance = this.transferTokenBalance(asset.address);
return requiredValue.sub(userAssetBalance);
}
Expand Down
9 changes: 3 additions & 6 deletions src/modules/ADAR/components/RouteAssets/SwapDialog.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<template>
<div class="swap-dialog">
<dialog-base :visible.sync="isVisible" :title="'Swap'" custom-class="dialog__swap">
<Swap v-loading="swapLoading" ref="swap" />
</dialog-base>
</div>
<dialog-base :visible.sync="isVisible" :title="'Swap'" custom-class="dialog__swap" append-to-body>
<Swap v-loading="swapLoading" ref="swap" />
</dialog-base>
</template>

<script lang="ts">
Expand Down Expand Up @@ -68,7 +66,6 @@ export default class SwapDialog extends Mixins(mixins.TransactionMixin, mixins.D

<style lang="scss">
.dialog__swap {
z-index: 3000 !important;
.el-dialog {
max-width: 500px;
padding: 20px;
Expand Down
Loading

0 comments on commit 3ec229f

Please sign in to comment.