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

Method buildFiatToCryptoResponse

rate/rate.ts:596–602  ·  view source on GitHub ↗
(amount: number, cryptoAmount: number, price: number, cryptoSymbol: string, fiatSymbol: string, lastUpdated: Date)

Source from the content-addressed store, hash-verified

594 `💎 <b>当前汇率:</b> ${codeTag(`1 ${cryptoSymbol} = ${this.formatPrice(price)} ${fiatSymbol}`)}\n` +
595 `⏰ <b>数据更新:</b> ${lastUpdated.toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}`;
596 }
597
598 private buildCryptoToFiatResponse(amount: number, totalValue: number, price: number, cryptoSymbol: string, fiatSymbol: string, lastUpdated: Date): string {
599 return `💱 <b>汇率</b>\n\n` +
600 `${codeTag(`${this.formatAmount(amount)} ${cryptoSymbol} ≈`)}\n` +
601 `${codeTag(`${this.formatAmount(totalValue)} ${fiatSymbol}`)}\n\n` +
602 `💎 <b>当前汇率:</b> ${codeTag(`1 ${cryptoSymbol} = ${this.formatPrice(price)} ${fiatSymbol}`)}\n` +
603 `⏰ <b>数据更新:</b> ${lastUpdated.toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}`;
604 }
605

Callers 1

handleRateMethod · 0.95

Calls 3

formatAmountMethod · 0.95
formatPriceMethod · 0.95
codeTagFunction · 0.70

Tested by

no test coverage detected