update user balance script

This commit is contained in:
hatim boufnichel 2024-03-06 21:04:54 +01:00
parent df7671c5c9
commit f85b5bc5e7

View file

@ -18,6 +18,10 @@ const start = async () => {
log("migrations run sucessfully, exiting") log("migrations run sucessfully, exiting")
return return
} }
if (process.argv[2] === 'updateUserBalance') {
await storageManager.userStorage.UpdateUser(process.argv[3], { balance_sats: +process.argv[4] })
log("user balance updated correctly")
}
const mainHandler = new Main(mainSettings, storageManager) const mainHandler = new Main(mainSettings, storageManager)
await mainHandler.lnd.Warmup() await mainHandler.lnd.Warmup()
const serverMethods = GetServerMethods(mainHandler) const serverMethods = GetServerMethods(mainHandler)