Describe the bug
When using the OneKey Chrome extension and switching the network from Stellar Mainnet to Stellar Testnet, the wallet does not display the TESTNET XLM balance.
Additionally, calling:
window.$onekey.stellar.getNetwork()
still returns the Mainnet network instead of Testnet after switching.
Another related issue occurs when signing a Stellar Testnet transaction:
const result = await window.$onekey!.stellar!.signTransaction(xdr, {
address: options.address,
networkPassphrase: 'Test SDF Network ; September 2015', // Stellar TESTNET
});
When the OneKey modal opens, it still displays Stellar Mainnet transaction data and shows an error saying the wallet does not have enough XLM to fund the transaction, even though the transaction is intended for Stellar Testnet.
To Reproduce
- Open the OneKey Chrome extension.
- Switch the network from Stellar Mainnet to Stellar Testnet.
- Observe that the TESTNET XLM balance is not displayed.
- Call:
window.$onekey.stellar.getNetwork()
- Observe that it still returns Mainnet.
- Attempt to sign a Stellar Testnet transaction using:
const result = await window.$onekey!.stellar!.signTransaction(xdr, {
address: options.address,
networkPassphrase: 'Test SDF Network ; September 2015',
});
- Observe that the signing modal still behaves as if the transaction is on Mainnet and reports insufficient XLM balance.
Expected behavior
- Switching to Stellar Testnet should display the correct TESTNET XLM balance.
window.$onekey.stellar.getNetwork() should return the currently selected network (Testnet).
- The signing modal should recognize the transaction as a Stellar Testnet transaction and use the Testnet account/balance context instead of Mainnet.
Desktop (please complete the following information)
- OS: Ubuntu 24.04
- Browser: Chrome
- Version: 139.0.7258
Describe the bug
When using the OneKey Chrome extension and switching the network from Stellar Mainnet to Stellar Testnet, the wallet does not display the TESTNET XLM balance.
Additionally, calling:
still returns the Mainnet network instead of Testnet after switching.
Another related issue occurs when signing a Stellar Testnet transaction:
When the OneKey modal opens, it still displays Stellar Mainnet transaction data and shows an error saying the wallet does not have enough XLM to fund the transaction, even though the transaction is intended for Stellar Testnet.
To Reproduce
Expected behavior
window.$onekey.stellar.getNetwork()should return the currently selected network (Testnet).Desktop (please complete the following information)