- fix generate id for transaction

This commit is contained in:
Fadli 2022-11-18 16:06:51 +07:00
parent cf19989ed9
commit 12bd13fea7

View File

@ -598,17 +598,10 @@ export class TransactionService {
}
//HIT API SUPPLIER
let hexString = uuid.v4();
// remove decoration
hexString = hexString.replace(/-/g, '');
let base64String = Buffer.from(hexString, 'hex').toString('base64');
const trxId = Array(6)
.fill(null)
.map(() => {
return Math.round(Math.random() * 16).toString(16) + base64String;
return Math.round(Math.random() * 16).toString(16);
})
.join('');