-
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
Merged
Merged
Changes from 128 commits
Commits
Show all changes
139 commits
Select commit
Hold shift + click to select a range
4f458ba
feat(backend): WIP - add feeid to quote table
BlairCurrey 7dc1d60
refactor(backend): rename quote gql field
BlairCurrey e39bb88
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey 35ed878
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey 752df9b
fix(backend): add fee relation
BlairCurrey 088058b
feat(backend): WIP calculate fees in quote create
BlairCurrey 5cce896
refactor(backend): rename gql quote field
BlairCurrey 7bc19df
fix(backend): rm unused with graph fetched
BlairCurrey 8383ed5
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey a0b2c30
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey 874bcf6
feat(backend): move fee calculation to quote service
BlairCurrey d58532c
fix(backend): use quote error
BlairCurrey 4026c23
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey d4e0bdf
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey 9635035
fix(backend): rm unused fn
BlairCurrey 1fd63fd
refactor(backend): rename quote send amount value
BlairCurrey dc88ba8
refactor(backend): rename quote send amount to debit amount
BlairCurrey e393681
refactor(backend): rename out payment send amount to debit
BlairCurrey 9a09017
chore(backend): format
BlairCurrey 393198b
chore(documentation): update gql docs
BlairCurrey c5ea21d
fix(backend,localenv): trx amount
BlairCurrey 46cb2cd
fix(backend): handle cross currency fee in quote
BlairCurrey 28f096a
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey 4c3ae8e
refactor: update spec and rename more fields
BlairCurrey 93a0da7
fix(backend): outgoing limit test
BlairCurrey 4904216
refactor(backend): rename limits field
BlairCurrey 198b4ea
rename sendAmount to debitAmount
BlairCurrey 44e2884
fix(localenv): postman ecommerce flow
BlairCurrey 75b328a
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey 56bd689
fix(backend): remove useless checks
BlairCurrey 84c8421
chore(auth): update open-payments package version
BlairCurrey 3a1b353
chore(backend): rm commented out code
BlairCurrey b33aed1
fix(auth): migration to rename jsonb col
BlairCurrey fc6d045
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey 316e7f7
chore(auth): format
BlairCurrey a74de35
feat: add DuplicatePeer error
mkurapov 62577f3
fix: pass in peerService to autoPeeringService
mkurapov 01cfbf3
chore: update diff
mkurapov 3677482
chore: add to peer resolver test
mkurapov 2ba0761
feat: accept peering request
mkurapov 7e2df45
fix(backend): remove asset join
BlairCurrey 6a5bf5b
refactor(backend): remove variable assignment
BlairCurrey e361481
feat: wire up router for auto peering
mkurapov fc27cef
fix: update auto peering service
mkurapov 18f9bf3
feat: correct config
mkurapov 221c269
config: update auto peering routes & errors
mkurapov 3e74ebc
chore: prettier
mkurapov 6ee3165
Merge branch 'mk/1761/duplicate-peer' into mk/1802/accept-peering-req…
mkurapov 6203c79
feat: add createPeerByUrl mutation to schema
mkurapov 51a6bfc
feat: add initiatePeeringRequest method to auto peering service
mkurapov 0609169
feat: add createPeerByUrl resolver
mkurapov d12bc7b
chore: fix lint
mkurapov 46db7e7
Merge branch 'main' into mk/1765/auto-peering-mutation
mkurapov d28883f
chore: add generate graphql files
mkurapov b7a7ba6
Merge branch 'main' into mk/1802/accept-peering-request
mkurapov cc81785
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov 139426c
Merge branch 'main' into mk/1761/duplicate-peer
mkurapov 788a203
Merge branch 'mk/1761/duplicate-peer' into mk/1802/accept-peering-req…
mkurapov f523d87
chore: update graphql schema comment
mkurapov 3a69dd6
fix: add type to /post peer error
mkurapov 4d98970
feat: add postman request
mkurapov afa767f
chore: address comments
mkurapov 3ad9a83
Merge branch 'mk/1761/duplicate-peer' into mk/1802/accept-peering-req…
mkurapov d28da05
Update packages/backend/src/auto-peering/errors.ts
mkurapov a52658c
Merge branch 'mk/1802/accept-peering-request' of github.com:interledg…
mkurapov 6cb6419
chore: remove axios from app
mkurapov 0ac7e08
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov d5089e2
chore: add axios to app
mkurapov 1e1d461
chore: fix whitespace
mkurapov 310fce3
feature(backend): change error
BlairCurrey 937e495
Merge branch 'main' into bc/1639/add-fees-to-quote
BlairCurrey e6f6f34
reactor(documentation): update fee explanation
BlairCurrey 0567cf0
feat: use assetId in getByDestinationAddress
mkurapov 76bceb4
feat: update peer on duplicate peering request
mkurapov 5a1e0c7
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov de3a256
chore: remove quote url references
BlairCurrey 2079eac
feat: use proper outgoing/incoming http tokens
mkurapov 59015f9
feat: update error during auto-peering request
mkurapov 633ed35
fix(openapi): missing server warning
BlairCurrey b9910e1
Merge branch 'main' into mk/1802/accept-peering-request
mkurapov c540606
chore: fix route tests
mkurapov b0b90c2
feat: support maxPacketAmount and name in peering request
mkurapov ae971f7
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov 2204d81
chore: add fields to peering request
mkurapov d3648c1
feat: support maxPacketAmount and name in peering request
mkurapov ba0f6a9
Merge branch 'mk/1802/accept-peering-request' of github.com:interledg…
mkurapov 733f80a
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov b4d7b89
feat: default to peer given name if no name provided
mkurapov 069214b
chore: lint
mkurapov 0e9ccf1
fix: remove getter
mkurapov ae52e0d
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov bc7c69a
Temporary fix
raducristianpopa 874b7cc
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov 6d3fe2e
Revert "Temporary fix"
mkurapov 05155a8
chore(token-introspection): generate types
BlairCurrey 9619132
Merge branch 'main' into mk/1802/accept-peering-request
mkurapov 7c62a39
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov 0789378
chore: update tests
mkurapov db49061
refactor(documentation): rename sendAmount to debitAmount
BlairCurrey 8fb0154
Merge branch 'bc/1639/add-fees-to-quote' into mk/1802/accept-peering-…
mkurapov 8e8c1a5
Revert "Merge branch 'bc/1639/add-fees-to-quote' into mk/1802/accept-…
mkurapov a217d32
ci: test heap bump
mkurapov 66293e5
ci: logheapusage
mkurapov efb5d04
chore: bump jest
mkurapov 0b803cd
Merge branch 'mk/1802/accept-peering-request' of github.com:interledg…
mkurapov be95eec
chore: update tests
mkurapov a7a9f65
chore: update tests
mkurapov c165506
Merge branch 'mk/1802/accept-peering-request' of github.com:interledg…
mkurapov 0f2b805
Merge branch 'main' into mk/1802/accept-peering-request
mkurapov 8bb493e
Revert "ci: logheapusage"
mkurapov 5e2ac6b
Merge branch 'main' into mk/1765/auto-peering-mutation
mkurapov d61dca0
Merge branch 'main' into mk/1802/accept-peering-request
mkurapov 67692f3
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov 875642f
Merge branch 'main' into mk/1802/accept-peering-request
mkurapov 9e670aa
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov 10bb608
revert fix
mkurapov f940eb1
fix: revert pnpm lock
mkurapov 8892ad2
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov 776e8d7
Update mutation request
mkurapov 719f730
feat: allow knex trx to be used in transfer creation
mkurapov 3381713
feat: add initial amount of liquidity in peer service
mkurapov 18cd4ae
feat: add max amount of liquidity during auto-peering
mkurapov 08d556a
feat: support (new) liquidityThreshold param
mkurapov 519c465
Merge branch 'mk/1765/auto-peering-mutation' into mk/1855/add-initial…
mkurapov 2f4cfc9
chore: lint
mkurapov fb2ef2f
chore: fix test
mkurapov 1b53f92
Update `createPeer` and `createPeerByUrl` mutations in postman
mkurapov 5073f3d
Revert "Update `createPeer` and `createPeerByUrl` mutations in postman"
mkurapov 0965ee0
chore: rename to CreateOrUpdatePeerByUrlInput
mkurapov 0cc8632
feat: update peer on duplicate request
mkurapov f2e844f
feat: update auto-peering resolver
mkurapov 39c3790
Merge branch 'mk/1765/auto-peering-mutation' into mk/1855/add-initial…
mkurapov 19ec601
Merge branch 'main' into mk/1765/auto-peering-mutation
mkurapov f18a7b8
Merge branch 'main' into mk/1802/accept-peering-request
mkurapov b35f284
Merge branch 'mk/1802/accept-peering-request' into mk/1765/auto-peeri…
mkurapov 6c63b76
Merge branch 'mk/1765/auto-peering-mutation' into mk/1855/add-initial…
mkurapov ea056db
Update mutation
mkurapov ce65b7e
Merge branch 'mk/1765/auto-peering-mutation' into mk/1855/add-initial…
mkurapov b287606
Merge branch 'main' into mk/1855/add-initial-peer-liquidity
mkurapov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
48 changes: 46 additions & 2 deletions
48
localenv/mock-account-servicing-entity/generated/graphql.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export enum AutoPeeringError { | ||
InvalidIlpConfiguration = 'InvalidIlpConfiguration', | ||
InvalidPeerIlpConfiguration = 'InvalidPeerIlpConfiguration', | ||
UnknownAsset = 'UnknownAsset', | ||
PeerUnsupportedAsset = 'PeerUnsupportedAsset', | ||
InvalidPeerUrl = 'InvalidPeerUrl', | ||
InvalidPeeringRequest = 'InvalidPeeringRequest', | ||
DuplicatePeer = 'DuplicatePeer' | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types | ||
export const isAutoPeeringError = (o: any): o is AutoPeeringError => | ||
Object.values(AutoPeeringError).includes(o) | ||
|
||
export const errorToCode: { | ||
[key in AutoPeeringError]: number | ||
} = { | ||
[AutoPeeringError.InvalidIlpConfiguration]: 400, | ||
[AutoPeeringError.InvalidPeerIlpConfiguration]: 400, | ||
[AutoPeeringError.UnknownAsset]: 404, | ||
[AutoPeeringError.PeerUnsupportedAsset]: 400, | ||
[AutoPeeringError.InvalidPeerUrl]: 400, | ||
[AutoPeeringError.InvalidPeeringRequest]: 400, | ||
[AutoPeeringError.DuplicatePeer]: 409 | ||
} | ||
|
||
export const errorToMessage: { | ||
[key in AutoPeeringError]: string | ||
} = { | ||
[AutoPeeringError.InvalidIlpConfiguration]: | ||
'The ILP configuration is misconfigured', | ||
[AutoPeeringError.InvalidPeerIlpConfiguration]: `Requested peer's ILP configuration is misconfigured`, | ||
[AutoPeeringError.UnknownAsset]: 'Unknown asset', | ||
[AutoPeeringError.PeerUnsupportedAsset]: 'Peer does not support asset', | ||
[AutoPeeringError.InvalidPeerUrl]: | ||
'Peer URL is invalid or peer does not support auto-peering', | ||
[AutoPeeringError.InvalidPeeringRequest]: 'Invalid peering request', | ||
[AutoPeeringError.DuplicatePeer]: 'Duplicate peer' | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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