mirror of
https://github.com/GMGNAI/gmgn-skills.git
synced 2026-07-27 16:57:44 +00:00
fix(swap): normalize wallet addresses to lowercase before API call
Ensures from_address and multi-swap accounts are lowercased at the CLI boundary to prevent case-sensitivity issues on the API side. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,7 @@ export function registerSwapCommands(program: Command): void {
|
||||
if (opts.percent != null) validatePercent(opts.percent);
|
||||
const params: SwapParams = {
|
||||
chain: opts.chain,
|
||||
from_address: opts.from,
|
||||
from_address: opts.from.toLowerCase(),
|
||||
input_token: opts.inputToken,
|
||||
output_token: opts.outputToken,
|
||||
input_amount: opts.percent != null ? (opts.amount ?? "0") : opts.amount,
|
||||
@@ -109,7 +109,7 @@ export function registerSwapCommands(program: Command): void {
|
||||
}
|
||||
const params: MultiSwapParams = {
|
||||
chain: opts.chain,
|
||||
accounts,
|
||||
accounts: accounts.map((a: string) => a.toLowerCase()),
|
||||
input_token: opts.inputToken,
|
||||
output_token: opts.outputToken,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user