MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / formatAmount

Method formatAmount

rate/rate.ts:571–577  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

569 return value.toFixed(6);
570 }
571 }
572
573 private buildFiatToFiatResponse(amount: number, convertedAmount: number, rate: number, sourceSymbol: string, targetSymbol: string): string {
574 return `💱 <b>汇率</b>\n\n` +
575 `${codeTag(`${this.formatAmount(amount)} ${sourceSymbol} ≈`)}\n` +
576 `${codeTag(`${this.formatAmount(convertedAmount)} ${targetSymbol}`)}\n\n` +
577 `📊 <b>汇率:</b> ${codeTag(`1 ${sourceSymbol} = ${this.formatAmount(rate)} ${targetSymbol}`)}\n` +
578 `⏰ <b>更新时间:</b> ${new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}`;
579 }
580

Callers 5

handleRateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected