diff --git a/package.json b/package.json index 1ab25e945..a22fd0c29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adar", - "version": "1.0.6", + "version": "1.0.7", "repository": { "type": "git", "url": "https://github.com/soramitsu/adar.git" diff --git a/public/adar/template.csv b/public/adar/template.csv index d916df0b0..706307bba 100644 --- a/public/adar/template.csv +++ b/public/adar/template.csv @@ -1,10 +1,3 @@ -// RECIPIENT_NAME;WALLET_ADDRESS;AMOUNT;TARGET_TOKEN;IS_AMOUNT_IN_TOKENS -// RECIPIENT_NAME - Name -// WALLET_ADDRESS - SORA network wallet address -// AMOUNT - Amount to be received recipient should receive. Amounts can be expressed either in Dollars or in target tokens. If you want the recipient to receive tokens equivalent to the specified Dollar value, leave IS_AMOUNT_IN_TOKENS parameter empty. If you want to send a specific number of tokens to the recipient, set IS_AMOUNT_IN_TOKENS parameter to true. -// TARGET_TOKEN - The token that the recipient will receive (eg XOR, XSTUSD, etc) -// IS_AMOUNT_IN_TOKENS - optional parameter, if true - the AMOUNT parameter becomes the value of tokens sent -// Example - in the first row, the recipient will get 2000 XOR -// Example - in the second row, the recipient will get $3000 worth of PSWAP tokens -Melanie Wilson;cnWX1RR9W3iZXtrL5W6WjJoDsWWZHLDCDCMkmWyirHAZJyVu8;2000;XOR;true -Charles Scott;cnWX1RR9W3iZXtrL5W6WjJoDsWWZHLDCDCMkmWyirHAZJyVu8;3000;PSWAP \ No newline at end of file +// RECIPIENT_NAME // Name of the recipient;// WALLET_ADDRESS // wallet address in SORA network;// AMOUNT // Amount to be received recipient should receive. Amounts can be expressed either in Dollars or in target tokens. If you want the recipient to receive tokens equivalent to the specified Dollar value, leave IS_AMOUNT_IN_TOKENS parameter empty. If you want to send a specific number of tokens to the recipient, set IS_AMOUNT_IN_TOKENS parameter to true.;// TARGET_TOKEN // The token that the recipient will receive (eg XOR, XSTUSD, etc);// IS_AMOUNT_IN_TOKENS // optional parameter, if true - the AMOUNT parameter becomes the value of tokens sent +Melanie Wilson (the recipient will get 2000 XOR);5FcNgN7kg1C7sZZpiQ2GB1PZvD5JchNVKK6EqtUqJtmjrKJJ;2000;XOR;TRUE +Charles Scott (the recipient will get $3000 worth of PSWAP tokens);cnWX1RR9W3iZXtrL5W6WjJoDsWWZHLDCDCMkmWyirHAZJyVu8;3000;PSWAP; \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 08ed6631b..ffecad5b1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -352,6 +352,7 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin) @mutation.routeAssets.setTxInfo private setTxInfo!: (txInfo: TransactionInfo) => void; @mutation.routeAssets.setTxStatus private setTxStatus!: (status: SwapTransferBatchStatus) => void; @action.routeAssets.getBlockNumber private getBlockNumber!: (blockId: string) => Promise; + @mutation.routeAssets.setPricesAreUpdated private setPricesAreUpdated!: (value: boolean) => void; get googleDialogZIndex(): string { return this.$route.name === AdarPageNames.RouteAssets ? 'google-dialog-z-index' : ''; @@ -381,6 +382,7 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin) if (value.status === TransactionStatus.Error) { this.setTxStatus(SwapTransferBatchStatus.FAILED); + this.setPricesAreUpdated(true); recipients.forEach((reciever) => { this.setRecipientStatus({ id: reciever.id, @@ -426,6 +428,7 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin) if (!value || ![Operation.SwapAndSend, Operation.Transfer].includes(value.type)) return; const recipients = this.recipients.filter((item) => item.txId === value.id); this.setTxStatus(SwapTransferBatchStatus.FAILED); + this.setPricesAreUpdated(true); recipients.forEach((reciever) => { this.setRecipientStatus({ id: reciever.id, @@ -722,6 +725,8 @@ $sora-logo-width: 173.7px; &-content { flex: 1; + margin: $inner-spacing-big auto 0; + width: 100%; .app-disclaimer-container { margin-left: auto; diff --git a/src/components/App/Header/AppHeader.vue b/src/components/App/Header/AppHeader.vue index b8fa302bc..df76d986a 100644 --- a/src/components/App/Header/AppHeader.vue +++ b/src/components/App/Header/AppHeader.vue @@ -259,7 +259,6 @@ $app-controls-shadow--dark: inset 1px 1px 2px #52523d; } &--settings-panel { - box-shadow: $app-controls-shadow; filter: $app-controls-filter; border-radius: var(--s-border-radius-small); diff --git a/src/modules/ADAR/components/RouteAssets/SelectReportFormatDialog.vue b/src/modules/ADAR/components/RouteAssets/SelectReportFormatDialog.vue index 7b9bb8942..e0384e58c 100644 --- a/src/modules/ADAR/components/RouteAssets/SelectReportFormatDialog.vue +++ b/src/modules/ADAR/components/RouteAssets/SelectReportFormatDialog.vue @@ -5,6 +5,14 @@
{{ t('adar.routeAssets.dialogs.reportDialog.description') }}
+
+ +
+ + {{ option }} + +
+
{{ t('adar.routeAssets.dialogs.reportDialog.pdf') }} @@ -20,21 +28,43 @@ @@ -50,8 +80,31 @@ export default class SelectReportFormatDialog extends Mixins(mixins.TransactionM .buttons-container { display: flex; - // flex-direction: column; + margin-top: $inner-spacing-medium; gap: 12px; margin-bottom: $inner-spacing-medium; } + +.input-file-name-container { + position: relative; + + .options-container { + margin-top: $inner-spacing-mini; + display: flex; + gap: 8px; + font-size: var(--s-font-size-mini); + > span { + cursor: pointer; + opacity: 0.7; + &::before { + content: '•'; + } + + &:hover { + text-decoration: underline; + opacity: 1; + } + } + } +} diff --git a/src/modules/ADAR/components/RouteAssets/Stages/Done.vue b/src/modules/ADAR/components/RouteAssets/Stages/Done.vue index 9c1f87404..ac9dfef9f 100644 --- a/src/modules/ADAR/components/RouteAssets/Stages/Done.vue +++ b/src/modules/ADAR/components/RouteAssets/Stages/Done.vue @@ -159,7 +159,7 @@ export default class RoutingCompleted extends Mixins(TranslationMixin) { } get totalAmount() { - return this.maxInputAmount.totalAmountWithFee; + return this.maxInputAmount.totalAmountWithFee.dp(4); } get totalUSD() { @@ -237,7 +237,7 @@ export default class RoutingCompleted extends Mixins(TranslationMixin) { }); } - downloadCSV() { + downloadCSV(fileName: string) { const { txId, blockId, from, blockNumber } = this.batchTxInfo; const datetime = this.batchTxDatetime; const csvContent = @@ -253,13 +253,13 @@ export default class RoutingCompleted extends Mixins(TranslationMixin) { const encodedUri = encodeURI(csvContent); const link = document.createElement('a'); link.setAttribute('href', encodedUri); - link.setAttribute('download', `ADAR-${new Date().toLocaleDateString('en-GB')}.csv`); + link.setAttribute('download', `${fileName}.csv`); document.body.appendChild(link); // Required for FF link.click(); } - downloadPDF() { + downloadPDF(fileName: string) { const doc = new JsPDF({ putOnlyUsedFonts: true, orientation: 'landscape' }); const { txId, blockId, from, blockNumber } = this.batchTxInfo; const datetime = this.batchTxDatetime; @@ -331,7 +331,7 @@ export default class RoutingCompleted extends Mixins(TranslationMixin) { }, // includeHiddenHtml: true }); - doc.save(`ADAR-${new Date().toLocaleDateString('en-GB')}.pdf`); + doc.save(`${fileName}.pdf`); } } diff --git a/src/modules/ADAR/components/RouteAssets/Stages/ReviewDetails.vue b/src/modules/ADAR/components/RouteAssets/Stages/ReviewDetails.vue index 045e045f8..e27d844ae 100644 --- a/src/modules/ADAR/components/RouteAssets/Stages/ReviewDetails.vue +++ b/src/modules/ADAR/components/RouteAssets/Stages/ReviewDetails.vue @@ -116,7 +116,6 @@ :slippageTolerance="currentSlippage" @onSlippageChanged="updatePriceImpact" /> -
{{ t('adar.routeAssets.continue') }} diff --git a/src/modules/ADAR/components/RouteAssets/Stages/Routing.vue b/src/modules/ADAR/components/RouteAssets/Stages/Routing.vue index 7c3045609..66e8d5f72 100644 --- a/src/modules/ADAR/components/RouteAssets/Stages/Routing.vue +++ b/src/modules/ADAR/components/RouteAssets/Stages/Routing.vue @@ -55,8 +55,7 @@ import { MaxInputAmountInfo, Recipient, SwapTransferBatchStatus } from '@/store/ }, }) export default class RoutingAssets extends Mixins(TranslationMixin) { - @action.routeAssets.processingNextStage nextStage!: any; - @getter.routeAssets.recipients private recipients!: Array; + @action.routeAssets.processingNextStage nextStage!: () => void; @getter.routeAssets.recipientsTokens recipientsTokens!: Asset[]; @getter.routeAssets.inputToken inputToken!: Asset; @getter.routeAssets.overallEstimatedTokens overallEstimatedTokens!: (asset?: AccountAsset) => FPNumber; @@ -73,7 +72,7 @@ export default class RoutingAssets extends Mixins(TranslationMixin) { } get tokensEstimate() { - return this.maxInputAmount.totalAmountWithFee?.toLocaleString(); + return this.maxInputAmount.totalAmountWithFee?.dp(4).toLocaleString(); } get iconName() { diff --git a/src/modules/ADAR/views/RouteAssets.vue b/src/modules/ADAR/views/RouteAssets.vue index dfda914b5..df4161f8e 100644 --- a/src/modules/ADAR/views/RouteAssets.vue +++ b/src/modules/ADAR/views/RouteAssets.vue @@ -74,9 +74,10 @@ export default class RouteAssets extends Mixins(mixins.LoadingMixin, Translation