-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: adapt add-gas module to support IOC pattern
- Loading branch information
1 parent
1912f6c
commit 650c112
Showing
11 changed files
with
130 additions
and
110 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
npx rimraf build cosmosSigner services *.js *.d.ts | ||
npx rimraf build add-gas *.js *.d.ts |
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
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
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,21 @@ | ||
import { | ||
createAxelarQueryBrowserClient, | ||
createConfigBrowserClient, | ||
createGMPBrowserClient, | ||
} from "@axelarjs/api"; | ||
|
||
import { SigningStargateClient } from "@cosmjs/stargate"; | ||
|
||
import { AddGasParams } from "~/types"; | ||
import { addGas } from "./addGas"; | ||
|
||
export default function addGasBrowser(params: AddGasParams) { | ||
const { environment } = params.sendOptions; | ||
|
||
return addGas(params, { | ||
axelarQueryClient: createAxelarQueryBrowserClient(environment, {}), | ||
configClient: createConfigBrowserClient(environment), | ||
gmpClient: createGMPBrowserClient(environment), | ||
getSigningStargateClient: SigningStargateClient.connectWithSigner, | ||
}); | ||
} |
File renamed without changes.
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,21 @@ | ||
import { | ||
createAxelarQueryNodeClient, | ||
createConfigNodeClient, | ||
createGMPNodeClient, | ||
} from "@axelarjs/api"; | ||
|
||
import { SigningStargateClient } from "@cosmjs/stargate"; | ||
|
||
import { AddGasParams } from "~/types"; | ||
import { addGas } from "./addGas"; | ||
|
||
export default function addGasNode(params: AddGasParams) { | ||
const { environment } = params.sendOptions; | ||
|
||
return addGas(params, { | ||
axelarQueryClient: createAxelarQueryNodeClient(environment, {}), | ||
configClient: createConfigNodeClient(environment), | ||
gmpClient: createGMPNodeClient(environment), | ||
getSigningStargateClient: SigningStargateClient.connectWithSigner, | ||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
export * from "./addGas"; | ||
export * from "./add-gas"; |
This file was deleted.
Oops, something went wrong.
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