-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support peer service adding initial amount of liquidity #1882
Conversation
@@ -205,7 +205,8 @@ async function acceptPeeringRequest( | |||
endpoint: args.ilpConnectorAddress, | |||
authToken: outgoingHttpToken | |||
} | |||
} | |||
}, | |||
initialLiquidity: BigInt(Number.MAX_SAFE_INTEGER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue max amount of liquidity during auto-peering
): Promise<LedgerAccount | undefined> { | ||
return LedgerAccount.query(deps.knex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious what the intent of adding a transaction here is, since these look like they're just reading the database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are creating the account and reading it in the same transaction, we also need it here: https://github.com/interledger/rafiki/pull/1882/files#diff-4b287690c751dd38900f4202d32f2e0c023b378614a7363fbf791226fa926f45R152-R167
The base branch was changed.
# Conflicts: # packages/backend/src/auto-peering/service.test.ts # packages/backend/src/auto-peering/service.ts
✅ Deploy Preview for brilliant-pasca-3e80ec canceled.
|
* feat(backend): WIP - add feeid to quote table * refactor(backend): rename quote gql field * fix(backend): add fee relation * feat(backend): WIP calculate fees in quote create * refactor(backend): rename gql quote field * fix(backend): rm unused with graph fetched * feat(backend): move fee calculation to quote service * fix(backend): use quote error * fix(backend): rm unused fn * refactor(backend): rename quote send amount value * refactor(backend): rename quote send amount to debit amount * refactor(backend): rename out payment send amount to debit * chore(backend): format * chore(documentation): update gql docs * fix(backend,localenv): trx amount * fix(backend): handle cross currency fee in quote * refactor: update spec and rename more fields * fix(backend): outgoing limit test * refactor(backend): rename limits field * rename sendAmount to debitAmount * fix(localenv): postman ecommerce flow * fix(backend): remove useless checks * chore(auth): update open-payments package version * chore(backend): rm commented out code * fix(auth): migration to rename jsonb col * chore(auth): format * feat: add DuplicatePeer error * fix: pass in peerService to autoPeeringService * chore: update diff * chore: add to peer resolver test * feat: accept peering request * fix(backend): remove asset join * refactor(backend): remove variable assignment * feat: wire up router for auto peering * fix: update auto peering service * feat: correct config * config: update auto peering routes & errors * chore: prettier * feat: add createPeerByUrl mutation to schema * feat: add initiatePeeringRequest method to auto peering service * feat: add createPeerByUrl resolver * chore: fix lint * chore: add generate graphql files * chore: update graphql schema comment * fix: add type to /post peer error * feat: add postman request * chore: address comments * Update packages/backend/src/auto-peering/errors.ts Co-authored-by: Radu-Cristian Popa <[email protected]> * chore: remove axios from app * chore: add axios to app * chore: fix whitespace * feature(backend): change error * reactor(documentation): update fee explanation * feat: use assetId in getByDestinationAddress * feat: update peer on duplicate peering request * chore: remove quote url references * feat: use proper outgoing/incoming http tokens * feat: update error during auto-peering request * fix(openapi): missing server warning * chore: fix route tests * feat: support maxPacketAmount and name in peering request * chore: add fields to peering request * feat: support maxPacketAmount and name in peering request * feat: default to peer given name if no name provided * chore: lint * fix: remove getter * Temporary fix * Revert "Temporary fix" This reverts commit bc7c69a. * chore(token-introspection): generate types * chore: update tests * refactor(documentation): rename sendAmount to debitAmount * Revert "Merge branch 'bc/1639/add-fees-to-quote' into mk/1802/accept-peering-request" This reverts commit 8fb0154, reversing changes made to 9619132. * ci: test heap bump * ci: logheapusage * chore: bump jest * chore: update tests * chore: update tests * Revert "ci: logheapusage" This reverts commit 66293e5. * revert fix * fix: revert pnpm lock * Update mutation request * feat: allow knex trx to be used in transfer creation * feat: add initial amount of liquidity in peer service * feat: add max amount of liquidity during auto-peering * feat: support (new) liquidityThreshold param * chore: lint * chore: fix test * Update `createPeer` and `createPeerByUrl` mutations in postman * Revert "Update `createPeer` and `createPeerByUrl` mutations in postman" This reverts commit 1b53f92. * chore: rename to CreateOrUpdatePeerByUrlInput * feat: update peer on duplicate request * feat: update auto-peering resolver * Update mutation --------- Co-authored-by: Blair Currey <[email protected]> Co-authored-by: Radu-Cristian Popa <[email protected]>
Changes proposed in this pull request
accountingService.createDeposit
to take in a knex transaction (so we can fail peer creation if we couldn't add initial amount of liquidity)Context
Fixes #1855
Checklist
fixes #number