Skip to content

Commit 8e3cf96

Browse files
authored
fix(localenv): fix env, localenv, bruno errors (#3603)
1 parent 960bf1c commit 8e3cf96

File tree

7 files changed

+9
-4
lines changed

7 files changed

+9
-4
lines changed

bruno/collections/Rafiki/Examples/Open Payments/Get receiver wallet address.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ script:post-response {
4747
resourceUrl.hostname.includes('cloud-nine-wallet') ||
4848
resourceUrl.hostname.includes('happy-life-bank')
4949
){
50-
const port = resourceUrl.hostname.includes('cloud-nine-wallet') ? 3000 : 4000
50+
const port = resourceUrl.hostname.includes('cloud-nine-wallet') ? bru.getEnvVar('cloudNineOpenPaymentsPort') : bru.getEnvVar('happyLifeOpenPaymentsPort')
5151
bru.setEnvVar("receiverOpenPaymentsHost", 'http://localhost:' + port + resourceUrl.path);
5252
} else {
5353
bru.setEnvVar("receiverOpenPaymentsHost", body?.resourceServer);

bruno/collections/Rafiki/Examples/Open Payments/Get sender wallet address.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ script:post-response {
4444

4545
const resourceUrl = url.parse(body?.resourceServer)
4646
if (resourceUrl.hostname.includes('cloud-nine-wallet') || resourceUrl.hostname.includes('happy-life-bank')) {
47-
const port = resourceUrl.hostname.includes('happy-life-bank') ? bru.getEnvVar('senderOpenPaymentsPort') : bru.getEnvVar('receiverOpenPaymentsPort')
47+
const port = resourceUrl.hostname.includes('happy-life-bank') ? bru.getEnvVar('happyLifeOpenPaymentsPort') : bru.getEnvVar('cloudNineOpenPaymentsPort')
4848
bru.setEnvVar("senderOpenPaymentsHost", 'http://localhost:' + port + resourceUrl.path);
4949
} else {
5050
bru.setEnvVar("senderOpenPaymentsHost", body?.resourceServer);

bruno/collections/Rafiki/environments/Local Playground.bru

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ vars {
3838
senderTenantWalletAddress: http://localhost:3000/cloud-ten/accounts/fgranklin
3939
senderHost: cloud-nine-wallet-backend
4040
receiverHost: happy-life-bank-backend
41+
cloudNineOpenPaymentsPort: 3000
42+
happyLifeOpenPaymentsPort: 4000
4143
}

bruno/collections/Rafiki/environments/Tenanted Local Playground - Swapped Sender & Receiver.bru

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ vars {
3838
senderTenantWalletAddress: http://localhost:4000/accounts/asmith
3939
senderHost: happy-life-bank-backend
4040
receiverHost: cloud-nine-wallet-backend
41+
cloudNineOpenPaymentsPort: 3000
42+
happyLifeOpenPaymentsPort: 4000
4143
}

localenv/mock-account-servicing-entity/app/lib/parse_config.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ export const CONFIG: Config = {
3636
authIdpServiceDomain:
3737
process.env.AUTH_IDP_SERVICE_DOMAIN || 'http://localhost:3009',
3838
interactionReturnUrl:
39-
process.env.INTERACTION_RETURN_URL || 'http://loclahost:3030'
39+
process.env.INTERACTION_RETURN_URL || 'http://localhost:3030'
4040
}

packages/mock-account-service-lib/src/requesters.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ async function getPeerByAddressAndAsset(
582582
) {
583583
id
584584
name
585+
staticIlpAddress
585586
asset {
586587
id
587588
scale

packages/mock-account-service-lib/src/seed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export async function setupFromSeed(
107107
assets[peeringAsset].id
108108
)
109109

110-
if (existingPeer) {
110+
if (existingPeer && existingPeer.staticIlpAddress === peer.peerIlpAddress) {
111111
continue
112112
}
113113

0 commit comments

Comments
 (0)