Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/SaTT-Wallet/Backend into…
Browse files Browse the repository at this point in the history
… retreivebudget
  • Loading branch information
waelhanfi04 committed Nov 20, 2023
2 parents 9a81a6a + 00779f0 commit 50c1cdd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion controllers/campaign.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2761,7 +2761,7 @@ module.exports.campaignsStatistics = async (req, res) => {

const payedAmountInCryptoCurrency = new Big(
link.payedAmount
).div(decimalPower.pow(getDecimal(tokenName)))
).div(decimalPower.pow(getDecimal(tokenName) ?? 18))
const cryptoUnitPriceInUSD = new Big(
Crypto[tokenName].price
)
Expand Down
17 changes: 9 additions & 8 deletions manager/oracles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1322,10 +1322,11 @@ exports.updateFacebookPages = async (UserId, accessToken, isInsta = false) => {
page.instagram_username = resMedia.username
}
await FbPage.updateOne(
{ id: res.data[i].id, UserId },
{ $set: page },
{ upsert: true }
)
{ id: res.data[i].id, UserId },
{ $set: page },
{ upsert: true }
)

}
if (!res.paging || !res.paging.next) {
break
Expand Down Expand Up @@ -1393,10 +1394,10 @@ exports.getFacebookPages = async (UserId, accessToken, isInsta = false) => {
page.instagram_username = resMedia.username
}
await FbPage.updateOne(
{ id: res.data[i].id, UserId },
{ $set: page },
{ upsert: true }
)
{ id: res.data[i].id, UserId },
{ $set: page },
{ upsert: true }
)
}
if (!res.paging || !res.paging.next) {
break
Expand Down
4 changes: 2 additions & 2 deletions web3/wallets.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ const getNetworkByToken = async (idCrypto) => {
const result = await rp.request(options)
results.push(result)
} catch (err) {
console.error('Error fetching data for batch:', err)

// Handle the error as needed, e.g., retry or skip
}
})
Expand Down Expand Up @@ -823,7 +823,7 @@ exports.getallCryptoMarket = async (startVariable) => {
const response = await rp(options)
result.push(response)
} catch (error) {
console.error('Error fetching prices:', error)

throw new Error('Error fetching prices')
}
}
Expand Down

0 comments on commit 50c1cdd

Please sign in to comment.