stackswap-front-api-test-02 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +3 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -5
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -25,7 +25,6 @@ import {LBTCStakingManager} from "./stackswap/manager/lbtcstaking.manager";
|
|
|
25
25
|
import {GroupFarmManager} from "./stackswap/manager/groupfarm.manager";
|
|
26
26
|
import {BridgeManager} from "./stackswap/manager/bridge.manager";
|
|
27
27
|
import {Farm3Manager} from "./stackswap/manager/farm3.manager";
|
|
28
|
-
import {hexToCV} from "@stacks/transactions";
|
|
29
28
|
|
|
30
29
|
export interface StackswapAPI {
|
|
31
30
|
config : StackswapConfig;
|
|
@@ -117,9 +116,8 @@ export class StackswapMainnetAPI implements StackswapAPI{
|
|
|
117
116
|
return this.fixedSenderAddress? this.fixedSenderAddress : this.senderAdderss;
|
|
118
117
|
}
|
|
119
118
|
getTenureBlockHeight: ()=> Promise<any> = async () => {
|
|
120
|
-
const get_result = await axios.
|
|
121
|
-
|
|
122
|
-
return Number((hexToCV(get_result.data.result) as any).value);
|
|
119
|
+
const get_result = await axios.get(this.config.STACKS_API_URL() + '/v2/info');
|
|
120
|
+
return get_result.data.tenure_height;
|
|
123
121
|
}
|
|
124
122
|
|
|
125
123
|
getFastBlockHeight: ()=> Promise<any> = async () => {
|
|
@@ -137,7 +135,7 @@ export class StackswapMainnetAPI implements StackswapAPI{
|
|
|
137
135
|
// @ts-ignore
|
|
138
136
|
async getCurrentBlocks() {
|
|
139
137
|
const get_result = await axios.get(this.config.STACKS_API_URL() + '/v2/info');
|
|
140
|
-
return {block_height : get_result.data.stacks_tip_height, burn_block_height : get_result.data.burn_block_height, tenure_block_height :
|
|
138
|
+
return {block_height : get_result.data.stacks_tip_height, burn_block_height : get_result.data.burn_block_height, tenure_block_height : get_result.data.tenure_height};
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
getQualifiedAddress(address: string): string {
|