fix
This commit is contained in:
parent
338414e3d3
commit
bf26e2ba83
2 changed files with 3 additions and 3 deletions
|
|
@ -459,7 +459,7 @@ export default class {
|
|||
throw new Error("request a swap quote before payng an external address")
|
||||
}
|
||||
const app = await this.storage.applicationStorage.GetApplication(ctx.app_id)
|
||||
const txSwap = await this.storage.paymentStorage.GetTransactionSwap(req.swap_operation_id)
|
||||
const txSwap = await this.storage.paymentStorage.GetTransactionSwap(req.swap_operation_id, ctx.app_user_id)
|
||||
if (!txSwap) {
|
||||
throw new Error("swap quote not found")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -466,8 +466,8 @@ export default class {
|
|||
return this.dbs.CreateAndSave<TransactionSwap>('TransactionSwap', swap)
|
||||
}
|
||||
|
||||
async GetTransactionSwap(swapOperationId: string, txId?: string) {
|
||||
return this.dbs.FindOne<TransactionSwap>('TransactionSwap', { where: { swap_operation_id: swapOperationId, used: false } }, txId)
|
||||
async GetTransactionSwap(swapOperationId: string, appUserId: string, txId?: string) {
|
||||
return this.dbs.FindOne<TransactionSwap>('TransactionSwap', { where: { swap_operation_id: swapOperationId, used: false, app_user_id: appUserId } }, txId)
|
||||
}
|
||||
|
||||
async FinalizeTransactionSwap(swapOperationId: string, txId: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue