Open friedger opened 12 months ago
You can refer to it first. https://github.com/OneKeyHQ/app-monorepo/pull/3146
If there's anything you don't understand, or that method doesn't understand, I'll help you out.
@ByteZhang1024 What is the different between IEncodedTx
and IDecodedTx
? They are both structured objects.
IEncodedTx It is generally defined in terms of different chains, usually transaction formats. It is primarily an object of direct flow within our internal business. e.g Everyone is familiar with ETH.
export type IEncodedTxEvm = {
from: string;
to: string;
value: string;
data?: string;
customData?: string;
nonce?: number | string;
gas?: string;
gasLimit?: string;
gasPrice?: string;
maxFeePerGas?: string;
maxPriorityFeePerGas?: string;
};
IDecodedTx Is a format we define for trading decode, which is used for various ui presentations. Transactions from any other chain can be converted into i decoded tx to display information on different business pages. It can be converted from IEncodedTx e.g https://github.com/OneKeyHQ/app-monorepo/blob/onekey/packages/engine/src/vaults/impl/evm/Vault.ts#L238
@ByteZhang1024 Thank you for the clarification.
How do you handle testnets? I see that create createClientFromURL does not take a testnet or chainid flag.
packages/shared/src/config/presetNetworks.ts Looking at the format here, just add a test chain.
Is your feature request related to a problem? Please describe. As a Stx holder, I would like to send and receive stx. Ideally, I would be able to stack/stake my stx.
Describe the solution you'd like The app should show the stx balance and let me receive and send stx.
Support for sip9 tokens would be the next step.
Describe alternatives you've considered Use a different app ðŸ˜
Additional context I can help developing, but need some guidance about the process.