Skip to content

Commit f7adea9

Browse files
committed
fix Txns module to use global api configs
1 parent 290a1e1 commit f7adea9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Diff for: src/modules/txns/txns.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ export default class Txns extends BaseModule {
2525
this.configs = merge({
2626
wait: true,
2727
}, configs);
28-
29-
this.algod = new algosdk.Algodv2(
30-
options.apiToken || '',
31-
options.apiUrl,
32-
options.apiPort || ''
33-
);
3428
}
3529

3630
public init(stack: AlgoStack) {
3731
super.init(stack);
32+
33+
this.algod = new algosdk.Algodv2(
34+
this.stack.configs.apiToken || '',
35+
this.stack.configs.apiUrl,
36+
this.stack.configs.apiPort || ''
37+
);
38+
3839
this.client = stack.client;
3940
if (!this.client) throw('Client module is required');
4041
return this;

0 commit comments

Comments
 (0)