Skip to content

Commit

Permalink
Merge pull request soramitsu#8 from soramitsu/polkaswap-merge
Browse files Browse the repository at this point in the history
Polkaswap merge
  • Loading branch information
timofeytrepalin authored Mar 3, 2023
2 parents a22177d + 42f0ac5 commit a22bce1
Show file tree
Hide file tree
Showing 97 changed files with 3,382 additions and 2,766 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polkaswap-exchange-web",
"version": "1.13.0",
"version": "1.15.0",
"repository": {
"type": "git",
"url": "https://github.com/sora-xor/polkaswap-exchange-web.git"
Expand All @@ -25,12 +25,14 @@
},
"dependencies": {
"@metamask/detect-provider": "^2.0.0",
"@soramitsu/soraneo-wallet-web": "1.13.1",
"@soramitsu/soraneo-wallet-web": "1.15.4",
"@walletconnect/web3-provider": "^1.8.0",
"base-64": "^1.0.0",
"core-js": "^3.26.0",
"country-code-emoji": "^2.3.0",
"direct-vuex": "^0.12.1",
"echarts": "^5.4.1",
"email-validator": "^2.0.4",
"ethers": "^5.7.2",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.5.28",
Expand All @@ -44,7 +46,7 @@
"vue-i18n": "^8.11.2",
"vue-plugin-load-script": "^2.x.x",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.5.3",
"vue-router": "^3.6.5",
"vuex": "^3.1.3"
},
"devDependencies": {
Expand Down
9 changes: 2 additions & 7 deletions public/adar/template.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
//name, wallet address, usd amount, token symbol
"Ted Cortez",000000000000000000000000000000000000000000000000,10,val
"Ted Cortez",000000000000000000000000000000000000000000000000,10,xor
"Honor Pearce",000000000000000000000000000000000000000000000000,1,pswap
"Rhianna Carpenter",000000000000000000000000000000000000000000000000,10,xor
"Ali Odonnell",000000000000000000000000000000000000000000000000,1,val
"Julian Jenkins",000000000000000000000000000000000000000000000000,1,val
Melanie Wilson;cnWX1RR9W3iZXtrL5W6WjJoDsWWZHLDCDCMkmWyirHAZJyVu8;2000;XOR
Charles Scott;cnWX1RR9W3iZXtrL5W6WjJoDsWWZHLDCDCMkmWyirHAZJyVu8;3000;PSWAP
Binary file added public/card/sora-card-front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/card/sora-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 22 additions & 22 deletions scripts/generateLocaleJson.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
import fs from 'fs'
import { JSDOM } from 'jsdom'
import fs from 'fs';
import { JSDOM } from 'jsdom';

// Mock browser dependencies for imported libraries
const dom = new JSDOM()
global.document = dom.window.document as any
global.window = dom.window as any
global.localStorage = { getItem: () => {} } as any
const dom = new JSDOM();
global.document = dom.window.document as any;
global.window = dom.window as any;
global.localStorage = { getItem: () => {} } as any;

function format (obj: any, formatted: any) {
function format(obj: any, formatted: any) {
for (const key of Object.keys(obj)) {
const value = obj[key]
if (typeof (value) === 'string') {
formatted[key] = value
const value = obj[key];
if (typeof value === 'string') {
formatted[key] = value;
} else {
formatted[key] = {}
format(value, formatted[key])
formatted[key] = {};
format(value, formatted[key]);
if (!Object.keys(formatted[key]).length) {
delete formatted[key]
delete formatted[key];
}
}
}
}

(async function main () {
const buildDir = './src/lang'
(async function main() {
const buildDir = './src/lang';
if (!fs.existsSync(buildDir)) {
fs.mkdirSync(buildDir)
fs.mkdirSync(buildDir);
}
const langObj = (await import('../src/lang/messages')).default
const formatted = {} as any
format(langObj, formatted)
fs.writeFileSync(`${buildDir}/en.json`, JSON.stringify(formatted, null, 4))
console.log(`${buildDir}/en.json created!`)
})()
const langObj = (await import('../src/lang/messages')).default;
const formatted = {} as any;
format(langObj, formatted);
fs.writeFileSync(`${buildDir}/en.json`, JSON.stringify(formatted, null, 4));
console.info(`${buildDir}/en.json created!`);
})();
5 changes: 3 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<app-logo-button slot="head" class="app-logo--menu" :theme="libraryTheme" @click="goToSwap" />
</app-menu>
<div class="app-body" :class="{ 'app-body__about': isAboutPage }">
<s-scrollbar class="app-body-scrollbar">
<s-scrollbar class="app-body-scrollbar" v-loading="pageLoading">
<div v-if="blockNumber && !isCurrentPageTooWide" class="block-number">
<s-tooltip :content="t('blockNumberText')" placement="bottom" tabindex="-1">
<a class="block-number-link" :href="blockExplorerLink" target="_blank" rel="nofollow noopener">
Expand Down Expand Up @@ -98,6 +98,7 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
@state.settings.browserNotifPopupVisibility browserNotifPopup!: boolean;
@state.settings.browserNotifPopupBlockedVisibility browserNotifPopupBlocked!: boolean;
@state.settings.blockNumber blockNumber!: number;
@state.router.loading pageLoading!: boolean;
@getter.wallet.transactions.firstReadyTx firstReadyTransaction!: Nullable<HistoryItem>;
@getter.wallet.account.isLoggedIn isSoraAccountConnected!: boolean;
Expand Down Expand Up @@ -376,7 +377,7 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
// console.dir(value);
// console.groupEnd();
const message = this.getMessage(value, this.shouldBalanceBeHidden);
const message = this.getOperationMessage(value, this.shouldBalanceBeHidden);
const isNewTx = !oldValue || oldValue.id !== value.id;
const recipients = this.recipients.filter((item) => item.txId === value.id);
Expand Down
68 changes: 0 additions & 68 deletions src/assets/img/sora-card/sora-card-front.svg

This file was deleted.

Loading

0 comments on commit a22bce1

Please sign in to comment.