Skip to content

Commit

Permalink
feat: remove owner from .env
Browse files Browse the repository at this point in the history
  • Loading branch information
bartosz-lipinski committed Nov 18, 2020
1 parent 9ea9f45 commit 703f1e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 0 additions & 7 deletions .env
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Program Owner in this file needs to match program owner that is part of on-chain swap program
# Applicable only to token-swap programs compiled with feature flag: ('program-owner-fees')
SWAP_PROGRAM_OWNER_FEE_ADDRESS=''

# HOST Public Key used for additional swap fees
SWAP_HOST_FEE_ADDRESS=''

# Rewired variables to comply with CRA restrictions
REACT_APP_SWAP_HOST_FEE_ADDRESS=$SWAP_HOST_FEE_ADDRESS
REACT_APP_SWAP_PROGRAM_OWNER_FEE_ADDRESS=$SWAP_PROGRAM_OWNER_FEE_ADDRESS


7 changes: 4 additions & 3 deletions src/utils/ids.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ let TOKEN_PROGRAM_ID = new PublicKey(
let SWAP_PROGRAM_ID: PublicKey;
let SWAP_PROGRAM_LEGACY_IDS: PublicKey[];

export const SWAP_HOST_FEE_ADDRESS = process.env.REACT_APP_SWAP_HOST_FEE_ADDRESS
? new PublicKey(`${process.env.REACT_APP_SWAP_HOST_FEE_ADDRESS}`)
: undefined;
export const SWAP_PROGRAM_OWNER_FEE_ADDRESS = new PublicKey(
"HfoTxFR1Tm6kGmWgYWD6J7YHVy1UwqSULUGVLXkJqaKN"
);

export const SWAP_HOST_FEE_ADDRESS = process.env.REACT_APP_SWAP_HOST_FEE_ADDRESS
? new PublicKey(`${process.env.REACT_APP_SWAP_HOST_FEE_ADDRESS}`)
: SWAP_PROGRAM_OWNER_FEE_ADDRESS;

console.debug(`Host address: ${SWAP_HOST_FEE_ADDRESS?.toBase58()}`);
console.debug(`Owner address: ${SWAP_PROGRAM_OWNER_FEE_ADDRESS?.toBase58()}`);

Expand Down

0 comments on commit 703f1e8

Please sign in to comment.