Skip to content

Commit

Permalink
feat: refine swap definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
okjodom committed Nov 5, 2024
1 parent a532cb0 commit b2699de
Show file tree
Hide file tree
Showing 33 changed files with 1,035 additions and 2,360 deletions.
12 changes: 1 addition & 11 deletions apps/api/src/swap/swap.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,7 @@ export class SwapController {
type: CreateOfframpSwapDto,
})
postOfframpTransaction(@Body() req: CreateOfframpSwapDto) {
return this.swapService.postOfframpTransaction({
quote: req.quote,
amount: req.amount,
ref: req.ref,
target: {
currency: req.target.currency,
destination: {
phone: req.target.destination.phone,
},
},
});
return this.swapService.postOfframpTransaction(req);
}

@Get('offramp/find/:id')
Expand Down
34 changes: 11 additions & 23 deletions apps/swap/prisma/client/edge.js

Large diffs are not rendered by default.

28 changes: 8 additions & 20 deletions apps/swap/prisma/client/index-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
exports.Prisma.MpesaOnrampSwapScalarFieldEnum = {
id: 'id',
state: 'state',
userId: 'userId',
mpesaId: 'mpesaId',
reference: 'reference',
lightning: 'lightning',
collectionTracker: 'collectionTracker',
rate: 'rate',
amountSats: 'amountSats',
retryCount: 'retryCount',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
Expand All @@ -137,24 +138,12 @@ exports.Prisma.MpesaOnrampSwapScalarFieldEnum = {
exports.Prisma.MpesaOfframpSwapScalarFieldEnum = {
id: 'id',
state: 'state',
userId: 'userId',
mpesaId: 'mpesaId',
reference: 'reference',
lightning: 'lightning',
phone: 'phone',
paymentTracker: 'paymentTracker',
rate: 'rate',
retryCount: 'retryCount',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};

exports.Prisma.IntasendMpesaTransactionScalarFieldEnum = {
id: 'id',
state: 'state',
apiRef: 'apiRef',
value: 'value',
charges: 'charges',
netAmount: 'netAmount',
currency: 'currency',
account: 'account',
amountSats: 'amountSats',
retryCount: 'retryCount',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
Expand Down Expand Up @@ -184,8 +173,7 @@ exports.SwapTransactionState = exports.$Enums.SwapTransactionState = {

exports.Prisma.ModelName = {
MpesaOnrampSwap: 'MpesaOnrampSwap',
MpesaOfframpSwap: 'MpesaOfframpSwap',
IntasendMpesaTransaction: 'IntasendMpesaTransaction'
MpesaOfframpSwap: 'MpesaOfframpSwap'
};

/**
Expand Down
Loading

0 comments on commit b2699de

Please sign in to comment.