forked from soramitsu/adar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request soramitsu#8 from soramitsu/polkaswap-merge
Polkaswap merge
- Loading branch information
Showing
97 changed files
with
3,382 additions
and
2,766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!`); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.