-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Liberland #606
Add Liberland #606
Conversation
peachbits
commented
Aug 25, 2023
•
edited
Loading
edited
- To see the specific tasks where the Asana app for GitHub is being used, see below:
- https://app.asana.com/0/0/1205147741891806
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with a few small changes.
src/polkadot/PolkadotEngine.ts
Outdated
const transfer = await this.api.tx.balances.transferKeepAlive( | ||
publicAddress, | ||
nativeAmount | ||
const edgeMetaToken = this.allTokens.find( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call this one edgeToken
src/polkadot/PolkadotEngine.ts
Outdated
/* | ||
HACK: We cannot query transactions if a currency doesn't have a subscanBaseUrl | ||
*/ | ||
if (this.networkInfo.subscanBaseUrl === '') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: Could we make subscanBaseUrl: string | undefined
? I really don't like blank-string checks, if we can use undefined instead.
src/polkadot/info/liberlandInfo.ts
Outdated
// Basic currency information: | ||
currencyCode: 'LLD', | ||
displayName: 'Liberland', | ||
pluginId: 'liberland', | ||
walletType: 'wallet:liberland', | ||
|
||
defaultSettings: {}, | ||
|
||
addressExplorer: '', | ||
transactionExplorer: | ||
'https://polkadot.js.org/apps/?rpc=wss%%3A%%2F%%2Fmainnet.liberland.org%%2F#/explorer/query/%s', | ||
|
||
denominations: [ | ||
// An array of Objects of the possible denominations for this currency | ||
{ | ||
name: 'LLD', | ||
multiplier: '1000000000000', | ||
symbol: '' | ||
} | ||
], | ||
metaTokens: makeMetaTokens(builtinTokens) // Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete the // Basic currency information:
and // An array of Objects of the possible denominations for this currency
comments, and move defaultSettings to the deprecated section:
// Deprecated:
defaultSettings: {},
metaTokens: makeMetaTokens(builtinTokens)
// Basic currency information: | ||
currencyCode: 'LDN', | ||
displayName: 'Liberland Testnet', | ||
pluginId: 'liberlandtestnet', | ||
walletType: 'wallet:liberlandtestnet', | ||
|
||
defaultSettings: {}, | ||
|
||
addressExplorer: '', | ||
transactionExplorer: | ||
'https://polkadot.js.org/apps/?rpc=wss%%3A%%2F%%2Ftestchain.liberland.org%%2F#/explorer/query/%s', | ||
|
||
denominations: [ | ||
// An array of Objects of the possible denominations for this currency | ||
{ | ||
name: 'LDN', | ||
multiplier: '1000000000000', | ||
symbol: '' | ||
} | ||
], | ||
metaTokens: makeMetaTokens(builtinTokens) // Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here: Delete the // Basic currency information:
and // An array of Objects of the possible denominations for this currency
comments, and move defaultSettings to the deprecated section:
// Deprecated:
defaultSettings: {},
metaTokens: makeMetaTokens(builtinTokens)
6d0f36a
to
2c989bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve these fixups!
This supports tokens on the assets pallet
2c989bf
to
c63a5c3
Compare