Skip to content

Commit

Permalink
Add scan QR feature (#747)
Browse files Browse the repository at this point in the history
* update wallet to 1.10.6 & refactoring

* update translations
  • Loading branch information
Nikita-Polyakov authored Jul 15, 2022
1 parent 6efb354 commit 17affb2
Show file tree
Hide file tree
Showing 47 changed files with 165 additions and 288 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"dependencies": {
"@metamask/detect-provider": "^1.2.0",
"@soramitsu/soraneo-wallet-web": "^1.10.5",
"@soramitsu/soraneo-wallet-web": "^1.10.6",
"@walletconnect/web3-provider": "^1.6.6",
"core-js": "^3.6.4",
"direct-vuex": "^0.12.1",
Expand Down
7 changes: 3 additions & 4 deletions src/components/AboutNetworkDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@

<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator';
import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import TranslationMixin from './mixins/TranslationMixin';
import DialogMixin from './mixins/DialogMixin';
import DialogBase from './DialogBase.vue';
import { Components, Links } from '@/consts';
import { lazyComponent } from '@/router';
@Component({
components: {
DialogBase,
DialogBase: components.DialogBase,
ExternalLink: lazyComponent(Components.ExternalLink),
},
})
export default class AboutNetworkDialog extends Mixins(TranslationMixin, DialogMixin) {
export default class AboutNetworkDialog extends Mixins(TranslationMixin, mixins.DialogMixin) {
get aboutBlocks() {
return [
{
Expand Down
3 changes: 1 addition & 2 deletions src/components/Bridge/TransferNotification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import { Component, Mixins } from 'vue-property-decorator';
import { components } from '@soramitsu/soraneo-wallet-web';
import DialogBase from '@/components/DialogBase.vue';
import TranslationMixin from '@/components/mixins/TranslationMixin';
import { lazyComponent } from '@/router';
import { Components } from '@/consts';
Expand All @@ -36,8 +35,8 @@ import type { Whitelist } from '@sora-substrate/util/build/assets/types';
@Component({
components: {
DialogBase,
SimpleNotification: lazyComponent(Components.SimpleNotification),
DialogBase: components.DialogBase,
TokenLogo: components.TokenLogo,
},
})
Expand Down
8 changes: 3 additions & 5 deletions src/components/ConfirmBridgeTransactionDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,26 @@

<script lang="ts">
import { Component, Mixins, Prop } from 'vue-property-decorator';
import { mixins } from '@soramitsu/soraneo-wallet-web';
import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import { CodecString, BridgeNetworks } from '@sora-substrate/util';
import type { Asset } from '@sora-substrate/util/build/assets/types';
import TranslationMixin from '@/components/mixins/TranslationMixin';
import DialogMixin from '@/components/mixins/DialogMixin';
import NetworkFormatterMixin from '@/components/mixins/NetworkFormatterMixin';
import DialogBase from '@/components/DialogBase.vue';
import { EvmSymbol, ZeroStringValue, Components } from '@/consts';
import { lazyComponent } from '@/router';
@Component({
components: {
DialogBase,
DialogBase: components.DialogBase,
BridgeTransactionDetails: lazyComponent(Components.BridgeTransactionDetails),
},
})
export default class ConfirmBridgeTransactionDialog extends Mixins(
mixins.FormattedAmountMixin,
mixins.LoadingMixin,
mixins.DialogMixin,
TranslationMixin,
DialogMixin,
NetworkFormatterMixin
) {
@Prop({ default: ZeroStringValue, type: String }) readonly amount!: string;
Expand Down
8 changes: 3 additions & 5 deletions src/components/ConfirmRemoveLiquidity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,21 @@ import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import type { Asset } from '@sora-substrate/util/build/assets/types';
import TranslationMixin from '@/components/mixins/TranslationMixin';
import DialogMixin from '@/components/mixins/DialogMixin';
import DialogBase from '@/components/DialogBase.vue';
import { lazyComponent } from '@/router';
import { Components } from '@/consts';
import { state, getter } from '@/store/decorators';
@Component({
components: {
DialogBase,
RemoveLiquidityTransactionDetails: lazyComponent(Components.RemoveLiquidityTransactionDetails),
DialogBase: components.DialogBase,
TokenLogo: components.TokenLogo,
RemoveLiquidityTransactionDetails: lazyComponent(Components.RemoveLiquidityTransactionDetails),
},
})
export default class ConfirmRemoveLiquidity extends Mixins(
mixins.NumberFormatterMixin,
TranslationMixin,
DialogMixin,
mixins.DialogMixin,
mixins.LoadingMixin
) {
@state.removeLiquidity.liquidityAmount private liquidityAmount!: string;
Expand Down
10 changes: 4 additions & 6 deletions src/components/ConfirmTokenPairDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,23 @@ import { Component, Mixins, Prop } from 'vue-property-decorator';
import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import TranslationMixin from '@/components/mixins/TranslationMixin';
import DialogMixin from '@/components/mixins/DialogMixin';
import DialogBase from '@/components/DialogBase.vue';
import { lazyComponent } from '@/router';
import { Components } from '@/consts';
import { AccountAsset } from '@sora-substrate/util/build/assets/types';
@Component({
components: {
DialogBase,
DialogBase: components.DialogBase,
TokenLogo: components.TokenLogo,
PairTokenLogo: lazyComponent(Components.PairTokenLogo),
InfoLine: components.InfoLine,
PairTokenLogo: lazyComponent(Components.PairTokenLogo),
},
})
export default class ConfirmTokenPairDialog extends Mixins(
mixins.FormattedAmountMixin,
mixins.LoadingMixin,
TranslationMixin,
DialogMixin
mixins.DialogMixin,
TranslationMixin
) {
@Prop({ type: String, default: '100' }) readonly shareOfPool!: string;
@Prop({ type: Object }) readonly firstToken!: Nullable<AccountAsset>;
Expand Down
146 changes: 0 additions & 146 deletions src/components/DialogBase.vue

This file was deleted.

7 changes: 3 additions & 4 deletions src/components/HelpDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@

<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator';
import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import TranslationMixin from './mixins/TranslationMixin';
import DialogMixin from './mixins/DialogMixin';
import DialogBase from './DialogBase.vue';
import { app, Links } from '@/consts';
@Component({
components: {
DialogBase,
DialogBase: components.DialogBase,
},
})
export default class HelpDialog extends Mixins(TranslationMixin, DialogMixin) {
export default class HelpDialog extends Mixins(TranslationMixin, mixins.DialogMixin) {
readonly appVersion = app.version;
readonly appEmail = app.email;
Expand Down
7 changes: 3 additions & 4 deletions src/components/MobilePopup/MobilePopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,19 @@

<script lang="ts">
import { Component, Mixins, Prop } from 'vue-property-decorator';
import DialogBase from '../DialogBase.vue';
import DialogMixin from '../mixins/DialogMixin';
import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import TranslationMixin from '../mixins/TranslationMixin';
import { StoreLinks } from '../../consts';
import QrCode from '../../assets/img/mobile/qr-code.svg?inline';
@Component({
components: {
DialogBase,
DialogBase: components.DialogBase,
QrCode,
},
})
export default class MobilePopup extends Mixins(DialogMixin, TranslationMixin) {
export default class MobilePopup extends Mixins(mixins.DialogMixin, TranslationMixin) {
@Prop({ type: String }) readonly fee!: string;
StoreLinks = StoreLinks;
Expand Down
5 changes: 2 additions & 3 deletions src/components/Moonpay/Moonpay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@

<script lang="ts">
import { Component, Mixins, Watch } from 'vue-property-decorator';
import { components } from '@soramitsu/soraneo-wallet-web';
import type Theme from '@soramitsu/soramitsu-js-ui/lib/types/Theme';
import type { WALLET_TYPES } from '@soramitsu/soraneo-wallet-web';
import DialogBase from '@/components/DialogBase.vue';
import MoonpayLogo from '@/components/logo/Moonpay.vue';
import MoonpayBridgeInitMixin from './MoonpayBridgeInitMixin';
import { getCssVariableValue } from '@/utils';
Expand All @@ -27,7 +26,7 @@ import type { MoonpayTransaction } from '@/utils/moonpay';
@Component({
components: {
DialogBase,
DialogBase: components.DialogBase,
MoonpayLogo,
MoonpayWidget: lazyComponent(Components.MoonpayWidget),
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Moonpay/MoonpayNotification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator';
import { components } from '@soramitsu/soraneo-wallet-web';
import type Theme from '@soramitsu/soramitsu-js-ui/lib/types/Theme';
import TranslationMixin from '@/components/mixins/TranslationMixin';
import { lazyComponent } from '@/router';
import DialogBase from '@/components/DialogBase.vue';
import MoonpayLogo from '@/components/logo/Moonpay.vue';
import { mutation, state, getter } from '@/store/decorators';
Expand All @@ -26,7 +26,7 @@ import { MoonpayNotifications } from './consts';
@Component({
components: {
DialogBase,
DialogBase: components.DialogBase,
MoonpayLogo,
SimpleNotification: lazyComponent(Components.SimpleNotification),
},
Expand Down
Loading

0 comments on commit 17affb2

Please sign in to comment.