Skip to content
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(backend)!: liquidityThresholdHigh for assets and peers #3085

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
6 changes: 4 additions & 2 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Create Asset.bru
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ body:graphql {
id
scale
withdrawalThreshold
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
}
}
}
Expand All @@ -31,7 +32,8 @@ body:graphql:vars {
"code": "JPY",
"scale": 6,
"withdrawalThreshold": null,
"liquidityThreshold": "100000000"
"liquidityThresholdLow": "100000000",
"liquidityThresholdHigh": "10000000000"
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Create Peer.bru
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ body:graphql {
id
name
liquidity
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
asset{
id
scale
Expand All @@ -40,7 +41,8 @@ body:graphql:vars {
},
"assetId": "{{assetId}}",
"maxPacketAmount": 1000,
"liquidityThreshold": 100000000,
"liquidityThresholdLow": 100000000,
"liquidityThresholdHigh": "100000000",
"initialLiquidity": 200000000
}
}
Expand Down
3 changes: 2 additions & 1 deletion bruno/collections/Rafiki/Rafiki Admin APIs/Delete Asset.bru
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ body:graphql {
id
scale
withdrawalThreshold
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ body:graphql {
id
scale
withdrawalThreshold
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
sendingFee {
id
type
Expand Down
3 changes: 2 additions & 1 deletion bruno/collections/Rafiki/Rafiki Admin APIs/Get Asset.bru
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ body:graphql {
id
scale
withdrawalThreshold
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
sendingFee {
id
type
Expand Down
3 changes: 2 additions & 1 deletion bruno/collections/Rafiki/Rafiki Admin APIs/Get Assets.bru
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ body:graphql {
id
scale
withdrawalThreshold
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
liquidity
sendingFee {
id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ body:graphql {
}
}
liquidity
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
}
}

Expand Down
3 changes: 2 additions & 1 deletion bruno/collections/Rafiki/Rafiki Admin APIs/Get Peer.bru
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ body:graphql {
}
}
liquidity
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion bruno/collections/Rafiki/Rafiki Admin APIs/Get Peers.bru
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ body:graphql {
scale
}
liquidity
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
staticIlpAddress
http {
outgoing {
Expand Down
6 changes: 4 additions & 2 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Update Asset.bru
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ body:graphql {
id
scale
withdrawalThreshold
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
}
}
}
Expand All @@ -30,7 +31,8 @@ body:graphql:vars {
"input": {
"id": "{{assetId}}",
"withdrawalThreshold": 100,
"liquidityThreshold": 100
"liquidityThresholdLow": 100,
"liquidityThresholdHigh": 500
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Update Peer.bru
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ body:graphql {
}
}
liquidity
liquidityThreshold
liquidityThresholdLow
liquidityThresholdHigh
}
}
}
Expand All @@ -39,7 +40,8 @@ body:graphql:vars {
"outgoing": {"endpoint": "http://peer-backend:3002", "authToken": "test"}
},
"maxPacketAmount": 1000,
"liquidityThreshold": 100
"liquidityThresholdLow": 100
"liquidityThresholdHigh": 500
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
meta {
name: Asset Liquidity High
type: http
seq: 9
}

post {
url: {{cloudNineWalletWebhookUrl}}
body: json
auth: none
}

body:json {
{
"id": "{{uuid}}",
"type": "asset.liquidity_low",
"data": {
"id": "{{assetId}}",
"asset": {
"id": "{{assetId}}",
"code": "EUR",
"scale": 2
},
"liquidityThresholdHigh": "9950",
"balance": "9980"
}
}
}

script:pre-request {
bru.setVar('uuid', require("uuid").v4());
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ body:json {
"code": "EUR",
"scale": 2
},
"liquidityThreshold": "10000",
"liquidityThresholdLow": "10000",
"liquidityThresholdHigh": "1000000",
"balance": "9980"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
meta {
name: Peer Liquidity High
type: http
seq: 11
}

post {
url: {{cloudNineWalletWebhookUrl}}
body: json
auth: none
}

body:json {
{
"id": "{{uuid}}",
"type": "peer.liquidity_low",
"data": {
"id": "{{peerId}}",
"asset": {
"id": "{{assetId}}",
"code": "USD",
"scale": 2
},
"liquidityThresholdHigh": "9800",
"balance": "9850"
}
}
}

script:pre-request {
bru.setVar('uuid', require("uuid").v4());
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Peer Liquidity Low
type: http
seq: 9
seq: 10
}

post {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Wallet Address Web Monetization
type: http
seq: 10
seq: 12
}

post {
Expand Down
10 changes: 5 additions & 5 deletions localenv/cloud-nine-wallet/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ assets:
- code: USD
scale: 2
liquidity: 100000000
liquidityThreshold: 10000000
liquidityThresholdLow: 10000000
- code: EUR
scale: 2
liquidity: 100000000
liquidityThreshold: 10000000
liquidityThresholdLow: 10000000
- code: MXN
scale: 2
liquidity: 100000000
liquidityThreshold: 10000000
liquidityThresholdLow: 10000000
- code: JPY
scale: 0
liquidity: 1000000
liquidityThreshold: 100000
liquidityThresholdLow: 100000
peeringAsset: 'USD'
peers:
- initialLiquidity: '10000000'
peerUrl: http://happy-life-bank-backend:3002
peerIlpAddress: test.happy-life-bank
liquidityThreshold: 1000000
liquidityThresholdLow: 1000000
accounts:
- name: 'Grace Franklin'
path: accounts/gfranklin
Expand Down
10 changes: 5 additions & 5 deletions localenv/happy-life-bank/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ assets:
- code: USD
scale: 2
liquidity: 10000000000
liquidityThreshold: 100000000
liquidityThresholdLow: 100000000
- code: EUR
scale: 2
liquidity: 10000000000
liquidityThreshold: 1000000
liquidityThresholdLow: 1000000
- code: MXN
scale: 2
liquidity: 10000000000
liquidityThreshold: 10000000
liquidityThresholdLow: 10000000
- code: JPY
scale: 0
liquidity: 1000000000
liquidityThreshold: 1000000
liquidityThresholdLow: 1000000
peeringAsset: 'USD'
peers:
- initialLiquidity: '1000000000000'
peerUrl: http://cloud-nine-wallet-backend:3002
peerIlpAddress: test.cloud-nine-wallet
liquidityThreshold: 1000000
liquidityThresholdLow: 1000000
accounts:
- name: 'Philip Fry'
path: accounts/pfry
Expand Down
Loading
Loading