Skip to content

Commit

Permalink
Merge branch 'main' into 1921/telemetry-instrument-rafiki
Browse files Browse the repository at this point in the history
  • Loading branch information
beniaminmunteanu committed Jan 15, 2024
2 parents 30bee87 + 30f682e commit d330f81
Show file tree
Hide file tree
Showing 105 changed files with 5,646 additions and 1,515 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -58,7 +58,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -72,4 +72,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
8 changes: 4 additions & 4 deletions infrastructure/helm/rafiki/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dependencies:
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 18.5.0
version: 18.6.3
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 13.2.27
version: 13.2.29
- name: rafiki-auth
repository: https://interledger.github.io/helm-charts
version: 0.4.0
Expand All @@ -14,5 +14,5 @@ dependencies:
- name: rafiki-frontend
repository: https://interledger.github.io/helm-charts
version: 0.4.0
digest: sha256:82620e588dfa7ea959868a59016b665a42631312cfed2398511c070a128bf589
generated: "2023-12-31T15:27:19.592448505Z"
digest: sha256:285deeb65d1e6c18459a15037bf716df325bb1e5149daeb80ebe9899b33ed989
generated: "2024-01-11T00:15:47.075431532Z"
4 changes: 2 additions & 2 deletions infrastructure/helm/rafiki/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ appVersion: 'v1.0.0-alpha.1'

dependencies:
- name: redis
version: "18.5.0"
version: "18.6.3"
repository: "https://charts.bitnami.com/bitnami"
- name: postgresql
version: '13.2.27'
version: '13.2.29'
repository: 'https://charts.bitnami.com/bitnami'
- name: rafiki-auth
version: '0.4.0'
Expand Down
48 changes: 24 additions & 24 deletions infrastructure/terraform/rafiki-test/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion infrastructure/terraform/rafiki-test/backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.9.0"
version = "~> 5.11.0"
}
}
backend "gcs" {
Expand Down
1 change: 1 addition & 0 deletions localenv/cloud-nine-wallet/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ assets:
scale: 0
liquidity: 1000000
liquidityThreshold: 100000
peeringAsset: 'USD'
peers:
- initialLiquidity: '10000000'
peerUrl: http://happy-life-bank-backend:3002
Expand Down
20 changes: 10 additions & 10 deletions localenv/docs/peer-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ Example Successful Response
}
```

Next, run the following query to add liquidity for the secondary instance
Next, run the following query to deposit liquidity for the secondary instance

Query:

```
mutation AddPeerLiquidity ($input: AddPeerLiquidityInput!) {
addPeerLiquidity(input: $input) {
mutation DepositPeerLiquidity ($input: DepositPeerLiquidityInput!) {
depositPeerLiquidity(input: $input) {
code
success
message
Expand All @@ -172,10 +172,10 @@ Example successful response:
```
{
"data": {
"addPeerLiquidity": {
"depositPeerLiquidity": {
"code": "200",
"success": true,
"message": "Added peer liquidity",
"message": "Deposited peer liquidity",
"error": null
}
}
Expand Down Expand Up @@ -296,13 +296,13 @@ Example successful response:
}
```

Next, run the following query to add liquidity for the primary instance
Next, run the following query to deposit liquidity for the primary instance

Query:

```
mutation AddPeerLiquidity ($input: AddPeerLiquidityInput!) {
addPeerLiquidity(input: $input) {
mutation DepositPeerLiquidity ($input: DepositPeerLiquidityInput!) {
depositPeerLiquidity(input: $input) {
code
success
message
Expand All @@ -328,10 +328,10 @@ Example successful response:
```
{
"data": {
"addPeerLiquidity": {
"depositPeerLiquidity": {
"code": "200",
"success": true,
"message": "Added peer liquidity",
"message": "Deposited peer liquidity",
"error": null
}
}
Expand Down
1 change: 1 addition & 0 deletions localenv/happy-life-bank/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ assets:
scale: 0
liquidity: 1000000000
liquidityThreshold: 1000000
peeringAsset: 'USD'
peers:
- initialLiquidity: '1000000000000'
peerUrl: http://cloud-nine-wallet-backend:3002
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface Fee {
export interface SeedInstance {
self: Self
assets: Array<Asset>
peeringAsset: string
peers: Array<Peering>
accounts: Array<Account>
fees: Array<Fee>
Expand Down
40 changes: 20 additions & 20 deletions localenv/mock-account-servicing-entity/app/lib/requesters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ export async function createAutoPeer(
}
`

const addedLiquidity = '10000' as unknown as bigint
const liquidityToDeposit = '10000' as unknown as bigint
const createPeerInput: { input: CreateOrUpdatePeerByUrlInput } = {
input: {
peerUrl,
assetId,
addedLiquidity
liquidityToDeposit
}
}
return apolloClient
Expand All @@ -164,22 +164,22 @@ export async function createAutoPeer(
})
}

export async function addPeerLiquidity(
export async function depositPeerLiquidity(
peerId: string,
amount: string,
transferUid: string
): Promise<LiquidityMutationResponse> {
const addPeerLiquidityMutation = gql`
mutation AddPeerLiquidity($input: AddPeerLiquidityInput!) {
addPeerLiquidity(input: $input) {
const depositPeerLiquidityMutation = gql`
mutation DepositPeerLiquidity($input: DepositPeerLiquidityInput!) {
depositPeerLiquidity(input: $input) {
code
success
message
error
}
}
`
const addPeerLiquidityInput = {
const depositPeerLiquidityInput = {
input: {
peerId: peerId,
amount: amount,
Expand All @@ -189,34 +189,34 @@ export async function addPeerLiquidity(
}
return apolloClient
.mutate({
mutation: addPeerLiquidityMutation,
variables: addPeerLiquidityInput
mutation: depositPeerLiquidityMutation,
variables: depositPeerLiquidityInput
})
.then(({ data }): LiquidityMutationResponse => {
console.log(data)
if (!data.addPeerLiquidity.success) {
if (!data.depositPeerLiquidity.success) {
throw new Error('Data was empty')
}
return data.addPeerLiquidity
return data.depositPeerLiquidity
})
}

export async function addAssetLiquidity(
export async function depositAssetLiquidity(
assetId: string,
amount: number,
transferId: string
): Promise<LiquidityMutationResponse> {
const addAssetLiquidityMutation = gql`
mutation AddAssetLiquidity($input: AddAssetLiquidityInput!) {
addAssetLiquidity(input: $input) {
const depositAssetLiquidityMutation = gql`
mutation DepositAssetLiquidity($input: DepositAssetLiquidityInput!) {
depositAssetLiquidity(input: $input) {
code
success
message
error
}
}
`
const addAssetLiquidityInput = {
const depositAssetLiquidityInput = {
input: {
assetId,
amount,
Expand All @@ -226,15 +226,15 @@ export async function addAssetLiquidity(
}
return apolloClient
.mutate({
mutation: addAssetLiquidityMutation,
variables: addAssetLiquidityInput
mutation: depositAssetLiquidityMutation,
variables: depositAssetLiquidityInput
})
.then(({ data }): LiquidityMutationResponse => {
console.log(data)
if (!data.addAssetLiquidity.success) {
if (!data.depositAssetLiquidity.success) {
throw new Error('Data was empty')
}
return data.addAssetLiquidity
return data.depositAssetLiquidity
})
}

Expand Down
Loading

0 comments on commit d330f81

Please sign in to comment.