Skip to content

Commit

Permalink
Merge pull request #1525 from sora-xor/release/1.40.0
Browse files Browse the repository at this point in the history
Release 1.40.0
  • Loading branch information
Stefan Popov authored Sep 11, 2024
2 parents 92743ef + 1f0d1ed commit 77721e2
Show file tree
Hide file tree
Showing 246 changed files with 1,092 additions and 830 deletions.
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

6 changes: 4 additions & 2 deletions env.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
},
"FEATURE_FLAGS": {
"moonpay": true,
"charts": true,
"soraCard": false,
"orderBook": true,
"kensetsu": true,
"assetOwner": false
"assetOwner": false,
"alt": false,
"debug": false
},
"SUBQUERY_ENDPOINT": "https://api.subquery.network/sq/sora-xor/sora-prod",
"SUBSQUID_ENDPOINT": "",
Expand Down Expand Up @@ -49,6 +50,7 @@
"CHAIN_GENESIS_HASH": "0x7e4e32d0feafd4f9c9414b0be86373f9a1efa904809b683453a9af6856d38ad5",
"SUB_NETWORKS": {
"Kusama": true,
"KusamaCurio": true,
"KusamaSora": true,
"Polkadot": true,
"PolkadotSora": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@cedelabs/widgets-universal": "^1.3.1",
"@metamask/detect-provider": "^2.0.0",
"@soramitsu/soraneo-wallet-web": "1.39.12",
"@soramitsu/soraneo-wallet-web": "1.40.0",
"@walletconnect/ethereum-provider": "^2.13.3",
"@walletconnect/modal": "^2.6.2",
"core-js": "^3.37.1",
Expand Down
9 changes: 5 additions & 4 deletions public/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
},
"FEATURE_FLAGS": {
"moonpay": true,
"charts": true,
"soraCard": false,
"orderBook": true,
"kensetsu": true,
"assetOwner": false
"assetOwner": false,
"alt": true,
"debug": true
},
"FAUCET_URL": "https://faucet.dev.sora2.tachi.soramitsu.co.jp/",
"TG_BOT_URL": "https://t.me/PolkaswapDevBot",
Expand All @@ -37,9 +38,9 @@
"address": "wss://ws.framenode-3.r0.dev.sora2.soramitsu.co.jp"
},
{
"chain": "SORA-dev Liberland",
"chain": "SORA-predev",
"name": "SORA",
"address": "wss://ws.framenode-1.lib1.dev.sora2.soramitsu.co.jp"
"address": "wss://ws.framenode-1.v1.predev.sora2.soramitsu.co.jp"
}
],
"SUBQUERY_ENDPOINT": "https://api.subquery.network/sq/sora-xor/sora-dev",
Expand Down
21 changes: 3 additions & 18 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ import { tmaSdkService } from '@/utils/telegram';
import type { FeatureFlags } from './store/settings/types';
import type { EthBridgeSettings, SubNetworkApps } from './store/web3/types';
import type { History, HistoryItem } from '@sora-substrate/util';
import type { WhitelistArrayItem } from '@sora-substrate/util/build/assets/types';
import type { EvmNetwork } from '@sora-substrate/util/build/bridgeProxy/evm/types';
import type { History, HistoryItem } from '@sora-substrate/sdk';
import type { WhitelistArrayItem } from '@sora-substrate/sdk/build/assets/types';
import type { EvmNetwork } from '@sora-substrate/sdk/build/bridgeProxy/evm/types';
import type DesignSystem from '@soramitsu-ui/ui-vue2/lib/types/DesignSystem';
import type Theme from '@soramitsu-ui/ui-vue2/lib/types/Theme';
Expand Down Expand Up @@ -441,21 +441,6 @@ ul ul {
}
.app {
.el-loading-mask {
background-color: var(--s-color-utility-body);
z-index: $app-loader-layer;
.el-loading-spinner {
background-image: url('~@/assets/img/pswap-loader.svg');
height: var(--s-size-medium);
width: var(--s-size-medium);
margin-left: calc(50% - (var(--s-size-medium) / 2));
> svg {
display: none;
}
}
}
&-main.app-main {
&--rewards,
&--referral {
Expand Down
2 changes: 1 addition & 1 deletion src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { axiosInstance } from '@sora-substrate/util';
import { axiosInstance } from '@sora-substrate/sdk';

import type VueRouter from 'vue-router';

Expand Down
4 changes: 4 additions & 0 deletions src/assets/img/networks/curio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/App/Alerts/AlertList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { ZeroStringValue } from '@/consts';
import { getter, mutation, state } from '@/store/decorators';
import { calcPriceChange, showMostFittingValue, toPrecision } from '@/utils';
import type { AccountAsset } from '@sora-substrate/util/build/assets/types';
import type { AccountAsset } from '@sora-substrate/sdk/build/assets/types';
import type { Alert, WhitelistIdsBySymbol } from '@soramitsu/soraneo-wallet-web/lib/types/common';
@Component({
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/Alerts/Alerts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Components, NumberedAlert } from '@/consts';
import { lazyComponent } from '@/router';
import { mutation, state } from '@/store/decorators';
import type { AccountAsset } from '@sora-substrate/util/build/assets/types';
import type { AccountAsset } from '@sora-substrate/sdk/build/assets/types';
enum AlertPages {
AlertList,
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/Alerts/CreateAlert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ import { getter, mutation, state } from '@/store/decorators';
import { AlertFrequencyTabs, AlertTypeTabs } from '@/types/tabs';
import { calcPriceChange, showMostFittingValue } from '@/utils';
import type { AccountAsset, WhitelistIdsBySymbol } from '@sora-substrate/util/build/assets/types';
import type { AccountAsset, WhitelistIdsBySymbol } from '@sora-substrate/sdk/build/assets/types';
import type { Alert } from '@soramitsu/soraneo-wallet-web/lib/types/common';
@Component({
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/Footer/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</template>

<script lang="ts">
import { FPNumber } from '@sora-substrate/util';
import { FPNumber } from '@sora-substrate/sdk';
import { getExplorerLinks, WALLET_CONSTS, WALLET_TYPES } from '@soramitsu/soraneo-wallet-web';
import { Status } from '@soramitsu-ui/ui-vue2/lib/types';
import { Component, Mixins } from 'vue-property-decorator';
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/Header/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</template>

<script lang="ts">
import { XOR, ETH } from '@sora-substrate/util/build/assets/consts';
import { XOR, ETH } from '@sora-substrate/sdk/build/assets/consts';
import { components, WALLET_CONSTS } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins, Prop } from 'vue-property-decorator';
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/Settings/Node/SelectNodeDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</template>

<script lang="ts">
import { SubNetworkId } from '@sora-substrate/util/build/bridgeProxy/sub/consts';
import { SubNetworkId } from '@sora-substrate/sdk/build/bridgeProxy/sub/consts';
import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import pick from 'lodash/fp/pick';
import { Component, Mixins, Prop } from 'vue-property-decorator';
Expand Down
2 changes: 1 addition & 1 deletion src/components/mixins/AssetsSearchMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, Mixins } from 'vue-property-decorator';

import SearchInputMixin from '@/components/mixins/SearchInputMixin';

import type { Asset, AccountAsset, RegisteredAccountAsset } from '@sora-substrate/util/build/assets/types';
import type { Asset, AccountAsset, RegisteredAccountAsset } from '@sora-substrate/sdk/build/assets/types';

@Component
export default class AssetsSearchMixin extends Mixins(SearchInputMixin) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/mixins/BaseTokenPairMixin.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { FPNumber, CodecString, Operation, NetworkFeesObject } from '@sora-substrate/util';
import { XOR } from '@sora-substrate/util/build/assets/consts';
import { FPNumber, CodecString, Operation, NetworkFeesObject } from '@sora-substrate/sdk';
import { XOR } from '@sora-substrate/sdk/build/assets/consts';
import { mixins } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins } from 'vue-property-decorator';

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

import type { AccountAsset } from '@sora-substrate/util/build/assets/types';
import type { AccountAsset } from '@sora-substrate/sdk/build/assets/types';

@Component
export default class BaseTokenPairMixin extends Mixins(TranslationMixin, mixins.FormattedAmountMixin) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/mixins/BridgeHistoryMixin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Operation, NetworkFeesObject } from '@sora-substrate/util';
import { NetworkFeesObject } from '@sora-substrate/sdk';
import { mixins } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins } from 'vue-property-decorator';

Expand All @@ -7,7 +7,7 @@ import router from '@/router';
import { state, mutation, action, getter } from '@/store/decorators';
import { isOutgoingTransaction } from '@/utils/bridge/common/utils';

import type { IBridgeTransaction } from '@sora-substrate/util';
import type { IBridgeTransaction } from '@sora-substrate/sdk';

@Component
export default class BridgeHistoryMixin<T extends IBridgeTransaction> extends Mixins(mixins.LoadingMixin) {
Expand Down
11 changes: 5 additions & 6 deletions src/components/mixins/BridgeMixin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FPNumber } from '@sora-substrate/util';
import { FPNumber } from '@sora-substrate/sdk';
import { mixins } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins } from 'vue-property-decorator';

Expand All @@ -7,8 +7,8 @@ import { PageNames } from '@/consts';
import router from '@/router';
import { getter, state } from '@/store/decorators';

import type { CodecString } from '@sora-substrate/util';
import type { RegisteredAccountAsset } from '@sora-substrate/util/build/assets/types';
import type { CodecString } from '@sora-substrate/sdk';
import type { RegisteredAccountAsset } from '@sora-substrate/sdk/build/assets/types';

@Component
export default class BridgeMixin extends Mixins(mixins.LoadingMixin, WalletConnectMixin) {
Expand Down Expand Up @@ -58,11 +58,10 @@ export default class BridgeMixin extends Mixins(mixins.LoadingMixin, WalletConne

get outgoingMinAmount(): FPNumber | null {
if (!this.outgoingMinLimit) return null;
// this fee is spend from transfer amount, so we add it to outgoing min limit
// [TODO: Bridge] remove when limit will be defined on backend
const transferFee = this.isNativeTokenSelected ? this.externalTransferFeeFP : FPNumber.ZERO;
// this fee is spend from transfer amount, so we add it to outgoing min limit
// minimum amount = existential deposit + xcm fee
return this.outgoingMinLimit.add(transferFee);
return this.outgoingMinLimit.add(this.externalTransferFeeFP);
}

get incomingMaxAmount(): FPNumber | null {
Expand Down
6 changes: 3 additions & 3 deletions src/components/mixins/BridgeTransactionMixin.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { BridgeNetworkType } from '@sora-substrate/util/build/bridgeProxy/consts';
import { BridgeNetworkType } from '@sora-substrate/sdk/build/bridgeProxy/consts';
import { WALLET_CONSTS } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins } from 'vue-property-decorator';

import NetworkFormatterMixin from '@/components/mixins/NetworkFormatterMixin';
import { soraExplorerLinks } from '@/utils';

import type { IBridgeTransaction } from '@sora-substrate/util';
import type { BridgeNetworkId } from '@sora-substrate/util/build/bridgeProxy/types';
import type { IBridgeTransaction } from '@sora-substrate/sdk';
import type { BridgeNetworkId } from '@sora-substrate/sdk/build/bridgeProxy/types';

@Component
export default class BridgeTransactionMixin extends Mixins(NetworkFormatterMixin) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/mixins/ExplorePageMixin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { KnownAssets } from '@sora-substrate/util/build/assets/consts';
import { KnownAssets } from '@sora-substrate/sdk/build/assets/consts';
import { SortDirection } from '@soramitsu-ui/ui-vue2/lib/components/Table/consts';
import { Component, Mixins, Prop, Watch } from 'vue-property-decorator';

Expand All @@ -7,7 +7,7 @@ import { getter } from '@/store/decorators';
import ScrollableTableMixin from './ScrollableTableMixin';
import TranslationMixin from './TranslationMixin';

import type { Asset, RegisteredAccountAsset } from '@sora-substrate/util/build/assets/types';
import type { Asset, RegisteredAccountAsset } from '@sora-substrate/sdk/build/assets/types';

@Component
export default class ExplorePageMixin extends Mixins(ScrollableTableMixin, TranslationMixin) {
Expand Down
12 changes: 7 additions & 5 deletions src/components/mixins/NetworkFormatterMixin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BridgeNetworkType, BridgeTxStatus } from '@sora-substrate/util/build/bridgeProxy/consts';
import { EvmNetworkId } from '@sora-substrate/util/build/bridgeProxy/evm/consts';
import { SubNetworkId } from '@sora-substrate/util/build/bridgeProxy/sub/consts';
import { BridgeNetworkType, BridgeTxStatus } from '@sora-substrate/sdk/build/bridgeProxy/consts';
import { EvmNetworkId } from '@sora-substrate/sdk/build/bridgeProxy/evm/consts';
import { SubNetworkId } from '@sora-substrate/sdk/build/bridgeProxy/sub/consts';
import { WALLET_CONSTS } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins } from 'vue-property-decorator';

Expand All @@ -15,8 +15,8 @@ import { isUnsignedToPart } from '@/utils/bridge/eth/utils';

import TranslationMixin from './TranslationMixin';

import type { IBridgeTransaction } from '@sora-substrate/util';
import type { BridgeNetworkId } from '@sora-substrate/util/build/bridgeProxy/types';
import type { IBridgeTransaction } from '@sora-substrate/sdk';
import type { BridgeNetworkId } from '@sora-substrate/sdk/build/bridgeProxy/types';

const { ETH_BRIDGE_STATES } = WALLET_CONSTS;

Expand Down Expand Up @@ -149,6 +149,8 @@ export default class NetworkFormatterMixin extends Mixins(TranslationMixin) {
return 'moonbeam';
case SubNetworkId.Kusama:
return 'kusama';
case SubNetworkId.KusamaCurio:
return 'curio';
case SubNetworkId.KusamaShiden:
return 'shiden';
case SubNetworkId.Rococo:
Expand Down
2 changes: 1 addition & 1 deletion src/components/mixins/SelectAssetMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AssetsSearchMixin from '@/components/mixins/AssetsSearchMixin';
import { getter } from '@/store/decorators';
import { sortAssets } from '@/utils';

import type { Asset, AccountAsset, RegisteredAccountAsset } from '@sora-substrate/util/build/assets/types';
import type { Asset, AccountAsset, RegisteredAccountAsset } from '@sora-substrate/sdk/build/assets/types';

const isEmpty = (a): boolean => isNil(a.balance) || !+a.balance.transferable;

Expand Down
4 changes: 2 additions & 2 deletions src/components/mixins/SelectedTokensRouteMixin.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { XSTUSD, XOR } from '@sora-substrate/util/build/assets/consts';
import { XSTUSD, XOR } from '@sora-substrate/sdk/build/assets/consts';
import { WALLET_TYPES, api } from '@soramitsu/soraneo-wallet-web';
import { Component, Vue } from 'vue-property-decorator';

import { PageNames } from '@/consts';
import { getter } from '@/store/decorators';

import type { AccountAsset, Asset, Whitelist } from '@sora-substrate/util/build/assets/types';
import type { AccountAsset, Asset, Whitelist } from '@sora-substrate/sdk/build/assets/types';
import type { NavigationGuardNext, Route } from 'vue-router';

const MAX_SYMBOL_LENGTH = 7;
Expand Down
4 changes: 2 additions & 2 deletions src/components/mixins/WalletConnectMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import router from '@/router';
import { action, getter, mutation, state } from '@/store/decorators';
import { Provider, installExtensionKey, handleRpcProviderError } from '@/utils/ethers-util';

import type { BridgeNetworkType } from '@sora-substrate/util/build/bridgeProxy/consts';
import type { BridgeNetworkId } from '@sora-substrate/util/build/bridgeProxy/types';
import type { BridgeNetworkType } from '@sora-substrate/sdk/build/bridgeProxy/consts';
import type { BridgeNetworkId } from '@sora-substrate/sdk/build/bridgeProxy/types';

@Component
export default class WalletConnectMixin extends Mixins(InternalConnectMixin) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/AddLiquidity/Confirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</template>

<script lang="ts">
import { AccountAsset } from '@sora-substrate/util/build/assets/types';
import { AccountAsset } from '@sora-substrate/sdk/build/assets/types';
import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins, Prop } from 'vue-property-decorator';
Expand Down
4 changes: 2 additions & 2 deletions src/components/pages/AddLiquidity/TransactionDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</template>

<script lang="ts">
import { FPNumber, CodecString } from '@sora-substrate/util';
import { FPNumber, CodecString } from '@sora-substrate/sdk';
import { components } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins, Prop } from 'vue-property-decorator';
Expand All @@ -54,7 +54,7 @@ import { Components } from '@/consts';
import { lazyComponent } from '@/router';
import { getter } from '@/store/decorators';
import type { AccountLiquidity } from '@sora-substrate/util/build/poolXyk/types';
import type { AccountLiquidity } from '@sora-substrate/sdk/build/poolXyk/types';
@Component({
components: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/Bridge/SelectAsset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import type { BridgeRegisteredAsset } from '@/store/assets/types';
import { state, getter } from '@/store/decorators';
import type { NetworkData } from '@/types/bridge';
import type { AccountAsset, RegisteredAccountAsset } from '@sora-substrate/util/build/assets/types';
import type { AccountAsset, RegisteredAccountAsset } from '@sora-substrate/sdk/build/assets/types';
@Component({
components: {
Expand Down
6 changes: 3 additions & 3 deletions src/components/pages/Bridge/SelectNetwork.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
</template>

<script lang="ts">
import { BridgeNetworkType } from '@sora-substrate/util/build/bridgeProxy/consts';
import { BridgeNetworkType } from '@sora-substrate/sdk/build/bridgeProxy/consts';
import { components } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins } from 'vue-property-decorator';
import NetworkFormatterMixin from '@/components/mixins/NetworkFormatterMixin';
import { action, mutation, state } from '@/store/decorators';
import type { AvailableNetwork } from '@/store/web3/types';
import type { SubNetwork } from '@sora-substrate/util/build/bridgeProxy/sub/types';
import type { BridgeNetworkId } from '@sora-substrate/util/build/bridgeProxy/types';
import type { SubNetwork } from '@sora-substrate/sdk/build/bridgeProxy/sub/types';
import type { BridgeNetworkId } from '@sora-substrate/sdk/build/bridgeProxy/types';
type NetworkItem = {
id: BridgeNetworkId;
Expand Down
Loading

0 comments on commit 77721e2

Please sign in to comment.