You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when coin is sold out, it will not be save in db with amount and usdPrice is 0.
fix code:
// ...constfilteredTotals=_(totals).filter(t=>!_(t.wallet).startsWith("md5:")).filter(t=>{// already handled in loadPortfoliosif(t.usdValue===0){returntrue}if(t.usdValue>1){returntrue}consttotalWallet=md5(t.wallet)constlastAsset=_(lastAssets).flatten().find(a=>a.symbol===t.symbol&&a.wallet===totalWallet)// not found in last asset, which means coin has already been removed before last recordif(!lastAsset){returnfalse}// coin has been sold out in last timeif(lastAsset.usdValue===0){returnfalse}returntrue}).map(t=>({
...t,// if usdValue < 1, means it has been sold out this time. update it to 0, because coin whose usdValue < 1 will be ignored before saving to databaseusdValue: t.usdValue>1 ? t.usdValue : 0,})).value()
The text was updated successfully, but these errors were encountered:
when coin is sold out, it will not be save in db with amount and usdPrice is 0.
fix code:
The text was updated successfully, but these errors were encountered: