From a2725bc5f4aad5d5359ba80ece373a14f97da9d9 Mon Sep 17 00:00:00 2001 From: gregfromstl Date: Fri, 30 May 2025 11:32:29 -0700 Subject: [PATCH 1/2] fix: token price cache to use proper address --- packages/thirdweb/src/pay/convert/cryptoToFiat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/thirdweb/src/pay/convert/cryptoToFiat.ts b/packages/thirdweb/src/pay/convert/cryptoToFiat.ts index c6c07660af3..245e8e55532 100644 --- a/packages/thirdweb/src/pay/convert/cryptoToFiat.ts +++ b/packages/thirdweb/src/pay/convert/cryptoToFiat.ts @@ -107,7 +107,7 @@ export async function convertCryptoToFiat( }, }), { - cacheKey: `convert-fiat-to-crypto-${to}-${chain.id}`, + cacheKey: `convert-fiat-to-crypto-${fromTokenAddress}-${chain.id}`, cacheTime: 1000 * 60, // 1 minute cache }, ); From 1c43eaba38edab172f409e498641294069fec193 Mon Sep 17 00:00:00 2001 From: gregfromstl Date: Fri, 30 May 2025 11:33:08 -0700 Subject: [PATCH 2/2] changeset --- .changeset/loose-tools-move.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/loose-tools-move.md diff --git a/.changeset/loose-tools-move.md b/.changeset/loose-tools-move.md new file mode 100644 index 00000000000..98cc9fee1b8 --- /dev/null +++ b/.changeset/loose-tools-move.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +Fixes token pricing in PayEmbed