Skip to content

Commit

Permalink
fix: use base/quote format on aegis-export
Browse files Browse the repository at this point in the history
  • Loading branch information
nvtaveras committed Oct 30, 2024
1 parent 3487411 commit 3eb2939
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/aegis-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,17 @@ const createRelayer = <T extends Environment>(
): Relayer => {
// Type assertion (as string) is safe here because we know that the keys of our RelayerAddresses object are always strings
const formattedRateFeed = (rateFeed as string).replace("_", "").toUpperCase();

// We use the format {base}/{quote} when deriving the relayer signer address from the rate feed
const rateFeedWithSlash = (rateFeed as string)
.replace("_", "/")
.toUpperCase();

return {
env,
rateFeed: formattedRateFeed,
rateFeedId: toRateFeedId(`relayed:${formattedRateFeed}`),
signerAddress: deriveRelayerAccount(mnemonic, rateFeed as string).address,
signerAddress: deriveRelayerAccount(mnemonic, rateFeedWithSlash).address,
relayerAddress: RelayerAddresses[env][rateFeed] as Address,
};
};
Expand Down

0 comments on commit 3eb2939

Please sign in to comment.