Add guard clause to liminal tokenized data#17977
Conversation
📝 WalkthroughWalkthroughThe change adds an early exit condition to the TVL calculation flow in the liminal-money project. When the API returns no balances, the function now returns early, preventing unnecessary subsequent token-amount update operations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The adapter at projects/liminal-money exports TVL: |
projects/liminal-money/index.js
Outdated
| if (!record) return; | ||
|
|
||
| await addTokenizdData(api); | ||
| if (Object.keys(api.getBalances()).length === 0) return; |
There was a problem hiding this comment.
can you instead throw an error here, else it would return empty data
|
The adapter at projects/liminal-money exports TVL: |
Summary by CodeRabbit