-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch diff for testing configuratons
- Loading branch information
Showing
1 changed file
with
86 additions
and
0 deletions.
There are no files selected for viewing
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,86 @@ | ||
diff --git a/src/constants/constants.ts b/src/constants/constants.ts | ||
index 0518efd..5584238 100644 | ||
--- a/src/constants/constants.ts | ||
+++ b/src/constants/constants.ts | ||
@@ -3,11 +3,11 @@ export const ASSET_CODE = 'EURC'; | ||
export const ASSET_ISSUER = 'GAQRF3UGHBT6JYQZ7YSUYCIYWAF4T2SAA5237Q5LIQYJOHHFAWDXZ7NM'; | ||
export const EURC_VAULT_ACCOUNT_ID = '6bsD97dS8ZyomMmp1DLCnCtx25oABtf19dypQKdZe6FBQXSm'; | ||
export const MIN_WITHDRAWAL_AMOUNT = '10000000000000'; | ||
-export const HORIZON_URL = 'https://horizon.stellar.org'; | ||
-//export const HORIZON_URL = "https://horizon-testnet.stellar.org"; | ||
+//export const HORIZON_URL = 'https://horizon.stellar.org'; | ||
+export const HORIZON_URL = "https://horizon-testnet.stellar.org"; | ||
export const BASE_FEE = '1000000'; | ||
-export const PENDULUM_WSS = 'wss://rpc-pendulum.prd.pendulumchain.tech'; | ||
-//export const PENDULUM_WSS = 'ws://localhost:8000'; | ||
+//export const PENDULUM_WSS = 'wss://rpc-pendulum.prd.pendulumchain.tech'; | ||
+export const PENDULUM_WSS = 'ws://localhost:8000'; | ||
|
||
export const ASSET_CODE_MOCK = 'USDC'; | ||
export const ASSET_ISSUER_MOCK = 'GAKNDFRRWA3RPWNLTI3G4EBSD3RGNZZOY5WKWYMQ6CQTG3KIEKPYWAYC'; | ||
diff --git a/src/services/anchor/index.ts b/src/services/anchor/index.ts | ||
index 054af4c..970074b 100644 | ||
--- a/src/services/anchor/index.ts | ||
+++ b/src/services/anchor/index.ts | ||
@@ -155,12 +155,12 @@ export async function sep24Second( | ||
const { sep24Url } = tomlValues; | ||
|
||
// TODOmock, testing | ||
- // await new Promise((resolve) => setTimeout(resolve, 1000)); | ||
- // return { | ||
- // amount: "10.3", | ||
- // memo: "todo", | ||
- // offrampingAccount: "GADBL6LKYBPNGXBKNONXTFVIRMQIXHH2ZW67SVA2R7XM6VBXMD2O6DIS", | ||
- // }; | ||
+ await new Promise((resolve) => setTimeout(resolve, 1000)); | ||
+ return { | ||
+ amount: "10.3", | ||
+ memo: "todo", | ||
+ offrampingAccount: "GADBL6LKYBPNGXBKNONXTFVIRMQIXHH2ZW67SVA2R7XM6VBXMD2O6DIS", | ||
+ }; | ||
|
||
// end mock testing | ||
|
||
diff --git a/src/services/stellar/index.tsx b/src/services/stellar/index.tsx | ||
index f84f9a3..5455487 100644 | ||
--- a/src/services/stellar/index.tsx | ||
+++ b/src/services/stellar/index.tsx | ||
@@ -1,9 +1,9 @@ | ||
import { Horizon, Keypair, TransactionBuilder, Operation, Networks, Asset, Memo, Transaction, Account } from 'stellar-sdk'; | ||
-import { HORIZON_URL, BASE_FEE, ASSET_CODE, ASSET_ISSUER } from '../../constants/constants'; | ||
+import { HORIZON_URL, BASE_FEE, ASSET_CODE_MOCK, ASSET_ISSUER_MOCK } from '../../constants/constants'; | ||
import { ISep24Result } from '../anchor'; | ||
|
||
const horizonServer = new Horizon.Server(HORIZON_URL); | ||
-const NETWORK_PASSPHRASE = Networks.PUBLIC; | ||
+const NETWORK_PASSPHRASE = Networks.TESTNET; | ||
import { EventStatus } from '../../components/GenericEvent'; | ||
|
||
export interface IStellarOperations { | ||
@@ -90,7 +90,7 @@ async function setupStellarAccount( | ||
}) | ||
.addOperation( | ||
Operation.changeTrust({ | ||
- asset: new Asset(ASSET_CODE, ASSET_ISSUER), | ||
+ asset: new Asset(ASSET_CODE_MOCK, ASSET_ISSUER_MOCK), | ||
}), | ||
) | ||
.setTimeout(30) | ||
@@ -125,7 +125,7 @@ async function createOfframpTransaction(sep24Result: ISep24Result, ephemeralKeys | ||
.addOperation( | ||
Operation.payment({ | ||
amount, | ||
- asset: new Asset(ASSET_CODE, ASSET_ISSUER), | ||
+ asset: new Asset(ASSET_CODE_MOCK, ASSET_ISSUER_MOCK), | ||
destination: offrampingAccount, | ||
}), | ||
) | ||
@@ -146,7 +146,7 @@ async function createAccountMergeTransaction(fundingSecret: string, ephemeralKey | ||
}) | ||
.addOperation( | ||
Operation.changeTrust({ | ||
- asset: new Asset(ASSET_CODE, ASSET_ISSUER), | ||
+ asset: new Asset(ASSET_CODE_MOCK, ASSET_ISSUER_MOCK), | ||
limit: '0', | ||
}), | ||
) |