Skip to content

Commit

Permalink
fix cloud sync sql
Browse files Browse the repository at this point in the history
  • Loading branch information
domechn committed Aug 1, 2023
1 parent 2cb26ce commit 54965d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlelayers/cloudsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ async function removeAssetsInCloud(assets: AssetModel[]): Promise<number> {

// return updated how many records
async function writeAssetsToDB(d: Database, assets: AssetModel[]): Promise<number> {
const insertValuesStr = assets.map(() => `(?, ?, ?, ?, ?, ?)`).join(", ")
const insertValuesStr = assets.map(() => `(?, ?, ?, ?, ?, ?, ?)`).join(", ")

await d.execute(`INSERT INTO ${ASSETS_TABLE_NAME} (uuid, createdAt, symbol, amount, value, price, wallet) VALUES ${insertValuesStr}`, _(assets).map((asset) => [
asset.uuid,
Expand Down

0 comments on commit 54965d2

Please sign in to comment.