Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"disklet": "^0.6.0",
"edge-core-js": "^2.47.1",
"edge-currency-accountbased": "^4.88.0",
"edge-currency-plugins": "^3.12.0",
"edge-currency-plugins": "github:bobbythelobster/edge-currency-plugins#claudine/ecash-ecx-support",
"edge-exchange-plugins": "^2.52.2",
"edge-info-server": "^3.12.0",
"edge-login-ui-rn": "^3.37.0",
Expand Down
13 changes: 13 additions & 0 deletions src/__tests__/constants/WalletAndCurrencyConstants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,16 @@ describe('botanix keysOnlyMode', function () {
expect(SPECIAL_CURRENCY_INFO.botanix.keysOnlyMode).toBe(true)
})
})

describe('eCash plugin variants', function () {
test('keeps ECX UTXO behavior separate from XEC', function () {
expect(SPECIAL_CURRENCY_INFO.bitcoinecash).toMatchObject({
hasSegwit: true,
isImportKeySupported: true,
maxSpendTargets: 32
})
expect(SPECIAL_CURRENCY_INFO.ecash).not.toBe(
SPECIAL_CURRENCY_INFO.bitcoinecash
)
})
})
2 changes: 2 additions & 0 deletions src/components/modals/WalletListMenuModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const WALLET_LIST_MENU: Array<{
{
pluginIds: [
'bitcoincash',
'bitcoinecash',
'bitcoinsv',
'bitcoin',
'bitcoingold',
Expand Down Expand Up @@ -122,6 +123,7 @@ export const WALLET_LIST_MENU: Array<{
'bitcoin',
'bitcoincash',
'bitcoincashtestnet',
'bitcoinecash',
'bitcoingold',
'bitcoingoldtestnet',
'bitcoinsv',
Expand Down
8 changes: 8 additions & 0 deletions src/constants/WalletAndCurrencyConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,14 @@ export const SPECIAL_CURRENCY_INFO: Record<string, SpecialCurrencyInfo> = {
isStakingSupported: false,
unstoppableDomainsTicker: 'ECASH'
},
bitcoinecash: {
maxSpendTargets: UTXO_MAX_SPEND_TARGETS,
hasSegwit: true,
initWalletName: lstrings.string_first_ecash_wallet_name,
displayBuyCrypto: false,
isImportKeySupported: true,
isStakingSupported: false
},
Comment thread
cursor[bot] marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shared ECX and XEC wallet name

Low Severity

ecashcom reuses lstrings.string_first_ecash_wallet_name (My eCash), the same default as XEC ecash. getUniqueWalletName only uniquifies within a pluginId, so both wallets can appear with identical names, which undercuts keeping ECX distinct from XEC.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f6db1e8. Configure here.

ethereum: {
initWalletName: lstrings.string_first_ethereum_wallet_name,
dummyPublicAddress: '0x0d73358506663d484945ba85d0cd435ad610b0a0',
Expand Down
5 changes: 5 additions & 0 deletions src/envConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ export const asEnvConfig = asObject({
nowNodesApiKey: asOptional(asString, '')
})
),
BITCOINECASH_INIT: asCorePluginInit(
asObject({
nowNodesApiKey: asOptional(asString, '')
})
),
ETHEREUM_INIT: asCorePluginInit(asEvmApiKeys),
ETHEREUM_POW_INIT: asCorePluginInit(asEvmApiKeys),
EXOLIX_INIT: asCorePluginInit(
Expand Down
1 change: 1 addition & 0 deletions src/util/corePlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const currencyPlugins: EdgeCorePluginsInit = {
coreum: ENV.COREUM_INIT,
cosmoshub: ENV.COSMOSHUB_INIT,
ecash: ENV.ECASH_INIT,
bitcoinecash: ENV.BITCOINECASH_INIT,
eos: true,
ethereum: ENV.ETHEREUM_INIT,
ethereumclassic: true,
Expand Down
Loading