Skip to content

Commit

Permalink
Merge pull request #619 from Adamant-im/feat/adamant-wallets
Browse files Browse the repository at this point in the history
Regenerate adamant-wallets (v2.5.0)
  • Loading branch information
bludnic committed May 3, 2024
2 parents 1d65835 + 73b15aa commit 8d5d6ed
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 190 deletions.
27 changes: 22 additions & 5 deletions scripts/wallets.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,22 @@ import _ from 'lodash'
const CRYPTOS_DATA_FILE_PATH = resolve('src/lib/constants/cryptos/data.json')
const CRYPTOS_ICONS_DIR_PATH = resolve('src/components/icons/cryptos')
const GENERAL_ASSETS_PATH = resolve('adamant-wallets/assets/general')
const BRANCH = process.argv[2]

run()
void run(BRANCH)

async function run() {
/**
*
* @param {string} branch The branch to pull from. E.g.: dev, master
* @return {Promise<void>}
*/
async function run(branch = 'master') {
// update adamant-wallets repo
await $`git submodule foreach git pull origin master`
await $`git submodule init`
await $`git submodule update`
await $`git submodule foreach git pull origin ${branch}`

console.log('Updating coins data from `adamant-wallets`. Using branch:', branch)

const { coins, config, coinDirNames, coinSymbols } = await initCoins()
await applyBlockchains(coins, coinSymbols)
Expand All @@ -24,6 +34,8 @@ async function run() {
await updateProductionConfig(config)
await updateDevelopmentConfig(config)
await updateTorConfig(config)

console.log('Coins updated successfully')
}

async function initCoins() {
Expand Down Expand Up @@ -75,8 +87,11 @@ async function initCoins() {
}
})

// Sort by key (coin symbol)
const sortedCoins = _.chain(coins).toPairs().sortBy(0).fromPairs().value()

return {
coins,
coins: sortedCoins,
config,
coinDirNames,
coinSymbols
Expand Down Expand Up @@ -120,10 +135,12 @@ async function copyIcons(coins, coinDirNames) {
for (const [name, coin] of Object.entries(coins)) {
const iconComponentName = `${_.capitalize(coin.symbol)}Icon.vue`

const iconPathDestination = join(CRYPTOS_ICONS_DIR_PATH, iconComponentName)
await copyFile(
join(GENERAL_ASSETS_PATH, coinDirNames[name], 'images', 'icon.vue'),
join(CRYPTOS_ICONS_DIR_PATH, iconComponentName)
iconPathDestination
)
await $`git add ${iconPathDestination}` // git track newly added icon
}
}

Expand Down
35 changes: 10 additions & 25 deletions src/components/icons/cryptos/FlokiIcon.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
<template>
<g>
<path
d="M53.6,35.4C-7,88.5,8.1,200.4,81.1,238.9c9.2,4.8,14,12.7,9.4,15.5
c-4.2,2.6-2.7,31.1,1.8,33.6c3.7,2,3.6,3.2-1,12.2C36.6,407.6,121,493.6,272.9,485.5c132.9-7.1,196.4-79.7,155.3-177.5
c-5.7-13.6-6.8-18.7-4.7-21.3c1.9-2.3,2.3-10.2,1.3-23.7l-1.6-20.2l10.6-6.7c71.6-45.2,83.8-148.2,23.9-200.7
C437.2,17.5,432,23.6,432,65.2c0,36.9-3.2,45.6-23.9,65.8c-25,24.3-50.3,33-64.6,22.1c-12.1-9.2-29.4-17.4-43.2-20.6
c-11-2.5-12.9-3.9-15.4-11.6c-6.7-20-48.9-19.9-55.5,0.1c-2.6,7.8-4.2,8.8-16.8,11.4c-14.8,3-31.7,10.9-44.6,20.7
c-14.3,10.9-39.3,2-64.7-22.9C82.9,110.4,79.3,100.5,79.3,64C79.3,23.7,73.9,17.7,53.6,35.4z M67.4,50.7
c-7.3,31.2,4.4,66.7,29.8,90.4c15.8,14.8,43.1,30.7,52.6,30.7c13.7,0-1.9,39.8-20.5,52.4c-21.9,14.8-40.2,10.2-66.7-16.8
C18,162.1,15.1,95.2,55.7,51C68.6,37.1,70.6,37.1,67.4,50.7z M455.6,51c47.4,51.4,31.3,143.7-30.6,176.5
c-26.9,14.3-62.9-8.3-66.9-42l-1.5-12.8l11.1-3.3c51.3-15.3,85.3-67.1,76.3-116.3C441,37,442.4,36.7,455.6,51z M268.8,121.7
c2.9,2.3,4.7,12.6,7,38.7c1.7,19.5,3.7,38.7,4.5,42.5l1.4,7H257h-24.6l1.4-9.5c0.8-5.2,2.7-24.4,4.3-42.5c3.2-36,4.8-39.3,18.8-39.3
C261.3,118.5,266.6,119.9,268.8,121.7z M326.7,229.9c48.6,8.5,88.8,27.2,86.8,40.5c-1.7,11.7-8.8,13.1-30.5,6.2
c-66.4-21.1-185.8-21.1-252.2,0c-33.3,10.6-44.6-6.7-15-23c30-16.5,42.9-19.9,110.7-29.6C242.6,221.7,298.8,225,326.7,229.9z
M315.3,276.1c12.6,1.5,36,6.3,52,10.5c16,4.2,33,7.9,37.6,8c10.4,0.4,12.8,4.2,23.5,38c13.4,42.3,6.9,68.3-24.5,97.6
c-96.2,90-323.3,47.9-323.3-60c0-25.2,18.6-78.2,26.4-75.2c1.9,0.7,13.1-1.5,24.7-5C183,274.6,256.9,268.9,315.3,276.1z
M179.7,297.7c-3,3.8-5.3,10.4-5.3,15.2c0,6-1.2,8.5-3.9,8.5c-6.7,0-23.7,9.9-26.7,15.6l-2.9,5.5l8.8-5.5c4.9-3,12.5-5.5,17-5.5h8.2
l-7,8.2c-11.3,13.4-16.2,26.9-16,43.8c0.4,24.1,4,34.4,4.5,12.7c0.6-29.2,18.1-58.4,33.3-55.4c20.2,4,28.1-28,10.4-42
C188.1,289.3,186.4,289.2,179.7,297.7z M315.9,299c-18,14.7-7.6,48.2,13,41.6c13.3-4.2,34,34.8,31.9,60.2c-0.8,9.8-0.5,11.6,1.1,6.9
c7.5-21.2,1.7-49.7-13.8-68.2l-6.7-8l9.7,0c5.4,0,13.5,2.3,18,5c4.5,2.8,8.2,4,8.2,2.7c0-4.2-13.6-13.1-24.6-16
c-9.9-2.6-10.9-3.6-10.9-10.9C341.9,293.6,330,287.4,315.9,299z M203.7,309.1c2.6,8.2-5,15-10.5,9.4c-5.1-5.1-2.5-14.8,4.1-14.8
C199.9,303.7,202.8,306.1,203.7,309.1z M325.5,309.1c2.6,8.2-5,15-10.5,9.4c-5.1-5.1-2.5-14.8,4.1-14.8
C321.7,303.7,324.6,306.1,325.5,309.1z M249.3,347.9c-1.4,0.5-5.7,1.7-9.5,2.5c-13.3,2.9-7.1,19.1,8.9,23.1
c13.6,3.4,4.5,21.5-10.8,21.5c-8.1,0-17.8-7.6-17.8-14c0-2.1-1.1-3.8-2.5-3.8c-4.7,0-2.6,11.8,3.2,17.1c8.6,8,17,9.1,27.9,3.5
c9.4-4.8,9.6-4.8,19,0c10.9,5.6,19.3,4.5,27.9-3.5c5.7-5.4,7.9-17.1,3.2-17.1c-1.4,0-2.5,1.7-2.5,3.8c0,6.4-9.7,14-17.8,14
c-15.6,0-23.7-17-10.4-22c10.3-3.9,17.5-15.2,12.7-19.9C277.3,349.8,254.5,346,249.3,347.9z M267,354.3c0.8,1.3-0.9,3.1-3.8,4
c-6.7,2.1-18.3-0.7-16.3-3.9C248.8,351.2,265,351.1,267,354.3z"
d="M203.355 306.927C205.981 315.317 198.304 322.275 192.748 316.545C187.596 311.327 190.222 301.401 196.89 301.401C199.516 301.401 202.446 303.857 203.355 306.927Z"
/>
<path
d="M326.396 306.927C329.023 315.317 321.345 322.275 315.789 316.545C310.637 311.327 313.264 301.401 319.931 301.401C322.558 301.401 325.487 303.857 326.396 306.927Z"
/>
<path
d="M267.3 353.178C268.108 354.508 266.391 356.35 263.461 357.271C256.693 359.42 244.975 356.555 246.995 353.28C248.915 350.006 265.28 349.903 267.3 353.178Z"
/>
<path
d="M81.099 238.9C8.09895 200.4 -7.00105 88.5 53.599 35.4C73.899 17.7 79.299 23.7 79.299 64C79.299 100.5 82.899 110.4 103.299 130.2C128.699 155.1 153.699 164 167.999 153.1C180.899 143.3 197.799 135.4 212.599 132.4C225.199 129.8 226.799 128.8 229.399 121C235.999 101 278.199 100.9 284.899 120.9C287.399 128.6 289.299 130 300.299 132.5C314.099 135.7 331.399 143.9 343.499 153.1C357.799 164 383.099 155.3 408.099 131C428.799 110.8 431.999 102.1 431.999 65.2C431.999 23.6 437.199 17.5 457.699 35.4C517.599 87.9 505.399 190.9 433.799 236.1L423.199 242.8L424.799 263C425.799 276.5 425.399 284.4 423.499 286.7C421.399 289.3 422.499 294.4 428.199 308C469.299 405.8 405.799 478.4 272.899 485.5C120.999 493.6 36.599 407.6 91.299 300.2C95.899 291.2 95.999 290 92.299 288C87.799 285.5 86.299 257 90.499 254.4C95.099 251.6 90.299 243.7 81.099 238.9ZM97.199 141.1C71.799 117.4 60.099 81.9 67.399 50.7C70.599 37.1 68.599 37.1 55.699 51C15.099 95.2 17.999 162.1 62.599 207.4C89.099 234.4 107.399 239 129.299 224.2C147.899 211.6 163.499 171.8 149.799 171.8C140.299 171.8 112.999 155.9 97.199 141.1ZM424.999 227.5C486.899 194.7 502.999 102.4 455.599 51C442.399 36.7 440.999 37 443.999 53.1C452.999 102.3 418.999 154.1 367.699 169.4L356.599 172.7L358.099 185.5C362.099 219.2 398.099 241.8 424.999 227.5ZM275.799 160.4C273.499 134.3 271.699 124 268.799 121.7C266.599 119.9 261.299 118.5 256.899 118.6C242.899 118.6 241.299 121.9 238.099 157.9C236.499 176 234.599 195.2 233.799 200.4L232.399 209.9H281.699L280.299 202.9C279.499 199.1 277.499 179.9 275.799 160.4ZM413.499 270.4C415.499 257.1 375.299 238.4 326.699 229.9C298.799 225 242.599 221.7 226.499 224C158.699 233.7 145.799 237.1 115.799 253.6C86.199 269.9 97.499 287.2 130.799 276.6C197.199 255.5 316.599 255.5 382.999 276.6C404.699 283.5 411.799 282.1 413.499 270.4ZM179.11 295.262C176.08 299.15 173.756 305.903 173.756 310.815C173.756 316.955 172.544 319.513 169.816 319.513C163.048 319.513 145.875 329.643 142.844 335.475L139.915 341.103L148.804 335.475C153.754 332.406 161.432 329.848 165.978 329.848H174.261L167.19 338.238C155.775 351.95 150.825 365.764 151.027 383.057C151.431 407.717 155.068 418.257 155.573 396.052C156.179 366.173 173.857 336.294 189.212 339.364C209.618 343.457 217.599 310.713 199.718 296.387C187.596 286.666 185.878 286.564 179.11 295.262ZM316.698 296.592C298.515 311.634 309.021 345.913 329.831 339.159C343.267 334.862 364.178 374.769 362.056 400.759C361.248 410.787 361.551 412.629 363.167 407.82C370.744 386.127 364.885 356.964 349.227 338.034L342.458 329.848H352.257C357.712 329.848 365.895 332.201 370.441 334.964C374.987 337.829 378.724 339.057 378.724 337.727C378.724 333.429 364.986 324.322 353.874 321.355C343.873 318.694 342.862 317.671 342.862 310.201C342.963 291.066 330.942 284.722 316.698 296.592ZM249.42 346.629C248.005 347.141 243.662 348.369 239.823 349.187C226.387 352.155 232.65 368.731 248.813 372.824C262.552 376.303 253.359 394.824 237.903 394.824C229.721 394.824 219.922 387.048 219.922 380.499C219.922 378.35 218.811 376.61 217.396 376.61C212.649 376.61 214.77 388.685 220.629 394.108C229.317 402.294 237.802 403.42 248.813 397.689C258.309 392.778 258.511 392.778 268.007 397.689C279.018 403.42 287.504 402.294 296.192 394.108C301.95 388.582 304.172 376.61 299.424 376.61C298.01 376.61 296.899 378.35 296.899 380.499C296.899 387.048 287.1 394.824 278.917 394.824C263.158 394.824 254.976 377.429 268.411 372.313C278.816 368.322 286.09 356.759 281.241 351.95C277.705 348.573 254.673 344.685 249.42 346.629Z"
/>
</g>
</template>
22 changes: 15 additions & 7 deletions src/config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,20 @@
"url": "https://node2.blockchain2fa.io"
},
{
"url": "https://sunshine.adamant.im"
"url": "https://phecda.adm.im",
"alt_ip": "http://46.250.234.248:36666"
},
{
"url": "https://tegmine.adm.im",
"alt_ip": "http://5.104.87.219:36666"
},
{
"url": "https://tauri.adm.im",
"alt_ip": "http://154.26.159.245:36666"
},
{
"url": "https://dschubba.adm.im",
"alt_ip": "http://85.239.234.17:36666"
}
],
"healthCheck": {
Expand Down Expand Up @@ -142,11 +155,6 @@
"explorerTx": "https://etherscan.io/tx/${ID}",
"nodes": {
"list": [
{
"url": "https://ethnode1.adamant.im",
"alt_ip": "http://95.216.41.106:44099",
"hasIndex": true
},
{
"url": "https://ethnode2.adamant.im",
"alt_ip": "http://95.216.114.252:44099",
Expand Down Expand Up @@ -218,4 +226,4 @@
"explorer": "https://liskscan.com",
"explorerAddress": "https://liskscan.com/account/${ID}"
}
}
}
22 changes: 15 additions & 7 deletions src/config/production.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,20 @@
"url": "https://node2.blockchain2fa.io"
},
{
"url": "https://sunshine.adamant.im"
"url": "https://phecda.adm.im",
"alt_ip": "http://46.250.234.248:36666"
},
{
"url": "https://tegmine.adm.im",
"alt_ip": "http://5.104.87.219:36666"
},
{
"url": "https://tauri.adm.im",
"alt_ip": "http://154.26.159.245:36666"
},
{
"url": "https://dschubba.adm.im",
"alt_ip": "http://85.239.234.17:36666"
}
],
"healthCheck": {
Expand Down Expand Up @@ -141,11 +154,6 @@
"eth": {
"nodes": {
"list": [
{
"url": "https://ethnode1.adamant.im",
"alt_ip": "http://95.216.41.106:44099",
"hasIndex": true
},
{
"url": "https://ethnode2.adamant.im",
"alt_ip": "http://95.216.114.252:44099",
Expand Down Expand Up @@ -218,4 +226,4 @@
"explorer": "https://liskscan.com",
"explorerAddress": "https://liskscan.com/account/${ID}"
}
}
}
6 changes: 1 addition & 5 deletions src/config/tor.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@
"eth": {
"nodes": {
"list": [
{
"url": "http://vj3qid4h2d4cj2gexivjuuybah3mjzenpdyr5bj6z4hctp52jn6qsgid.onion",
"hasIndex": true
},
{
"url": "http://jpbrp6xapsyfnvyosrpu5wmoi62fqotazkicjeiob32yz77rt7axobqd.onion",
"hasIndex": true
Expand Down Expand Up @@ -178,4 +174,4 @@
"explorer": "https://liskscan.com",
"explorerAddress": "https://liskscan.com/account/${ID}"
}
}
}
Loading

0 comments on commit 8d5d6ed

Please sign in to comment.