|
@@ -135,7 +135,7 @@ export abstract class InitiaTask extends JennieModule {
|
|
const res = await this.getDelegationInfo()
|
|
const res = await this.getDelegationInfo()
|
|
const flag = res.some((item: any) => {
|
|
const flag = res.some((item: any) => {
|
|
return (
|
|
return (
|
|
- item.balance[0].denom ===
|
|
|
|
|
|
+ item.balance.denom()[0] ===
|
|
'move/dbf06c48af3984ec6d9ae8a9aa7dbb0bb1e784aa9b8c4a5681af660cf8558d7d'
|
|
'move/dbf06c48af3984ec6d9ae8a9aa7dbb0bb1e784aa9b8c4a5681af660cf8558d7d'
|
|
)
|
|
)
|
|
})
|
|
})
|
|
@@ -180,7 +180,7 @@ export abstract class InitiaTask extends JennieModule {
|
|
const res = await this.getDelegationInfo()
|
|
const res = await this.getDelegationInfo()
|
|
const flag = res.some((item: any) => {
|
|
const flag = res.some((item: any) => {
|
|
return (
|
|
return (
|
|
- item.balance[0].denom ===
|
|
|
|
|
|
+ item.balance.denom()[0] ===
|
|
'move/b134ae6786f10ef74294e627d2519b63b7c742a6735f98682929fea9a84744d2'
|
|
'move/b134ae6786f10ef74294e627d2519b63b7c742a6735f98682929fea9a84744d2'
|
|
)
|
|
)
|
|
})
|
|
})
|
|
@@ -224,7 +224,7 @@ export abstract class InitiaTask extends JennieModule {
|
|
const res = await this.getDelegationInfo()
|
|
const res = await this.getDelegationInfo()
|
|
const flag = res.some((item: any) => {
|
|
const flag = res.some((item: any) => {
|
|
return (
|
|
return (
|
|
- item.balance[0].denom ===
|
|
|
|
|
|
+ item.balance.denom()[0] ===
|
|
'move/a2b0d3c8e53e379ede31f3a361ff02716d50ec53c6b65b8c48a81d5b06548200'
|
|
'move/a2b0d3c8e53e379ede31f3a361ff02716d50ec53c6b65b8c48a81d5b06548200'
|
|
)
|
|
)
|
|
})
|
|
})
|
|
@@ -268,11 +268,13 @@ export abstract class InitiaTask extends JennieModule {
|
|
async getDelegationInfo() {
|
|
async getDelegationInfo() {
|
|
const axiosClient = getAxiosClient(true)
|
|
const axiosClient = getAxiosClient(true)
|
|
|
|
|
|
- const data = await axiosClient.get(
|
|
|
|
- `https://b545809c-5562-4e60-b5a1-22e83df57748.initiation-1.mesa-rest.ue1-prod.newmetric.xyz/initia/mstaking/v1/delegations/${this.key.accAddress}`,
|
|
|
|
- )
|
|
|
|
|
|
+ const data = await this.lcd.mstaking.delegations(this.key.accAddress)
|
|
|
|
+ // const data = await axiosClient.get(
|
|
|
|
+ // `https://b545809c-5562-4e60-b5a1-22e83df57748.initiation-1.mesa-rest.ue1-prod.newmetric.xyz/initia/mstaking/v1/delegations/${this.key.accAddress}`,
|
|
|
|
+ // )
|
|
// console.log(JSON.stringify(response))
|
|
// console.log(JSON.stringify(response))
|
|
- return data.data.delegation_responses
|
|
|
|
|
|
+ return data[0]
|
|
|
|
+ // return data.data.delegation_responses
|
|
}
|
|
}
|
|
|
|
|
|
async stakeInit() {
|
|
async stakeInit() {
|
|
@@ -303,7 +305,9 @@ export abstract class InitiaTask extends JennieModule {
|
|
const data = await axiosClient.get(
|
|
const data = await axiosClient.get(
|
|
`https://b545809c-5562-4e60-b5a1-22e83df57748.initiation-1.mesa-rest.ue1-prod.newmetric.xyz/initia/mstaking/v1/delegations/${this.key.accAddress}`,
|
|
`https://b545809c-5562-4e60-b5a1-22e83df57748.initiation-1.mesa-rest.ue1-prod.newmetric.xyz/initia/mstaking/v1/delegations/${this.key.accAddress}`,
|
|
)
|
|
)
|
|
|
|
+
|
|
const response = data.data.delegation_responses
|
|
const response = data.data.delegation_responses
|
|
|
|
+ console.log(response)
|
|
if (response.length === 0) {
|
|
if (response.length === 0) {
|
|
return `done`
|
|
return `done`
|
|
}
|
|
}
|