Skip to content

Commit

Permalink
feat: follow tip (#1537)
Browse files Browse the repository at this point in the history
* feat: follow tip

* feat: follow tip
  • Loading branch information
trkhoi authored Dec 1, 2023
1 parent 2bad7a1 commit e158994
Show file tree
Hide file tree
Showing 4 changed files with 359 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/adapters/mochi-pay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ class MochiPay extends Fetcher {
})
}

async getTxByExternalId(external_id: string) {
return await this.jsonFetch(
`${MOCHI_PAY_API_BASE_URL}/transfer/${external_id}`,
)
}

async krystalStake(body: KrystalStakeRequest) {
return await this.jsonFetch(
`${MOCHI_PAY_API_BASE_URL}/earns/krystal/stake`,
Expand Down
10 changes: 9 additions & 1 deletion src/adapters/profile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ResponseGetDataUserProfileResponse } from "types/api"
import { MOCHI_BOT_SECRET } from "env"
import {
GetUserNFTCollectionResponse,
GetUserNFTsResponse,
Expand Down Expand Up @@ -226,7 +227,14 @@ class Profile extends Fetcher {
}

public async getById(id: string): Promise<any> {
return await this.jsonFetch(`${MOCHI_PROFILE_API_BASE_URL}/profiles/${id}`)
return await this.jsonFetch(
`${MOCHI_PROFILE_API_BASE_URL}/profiles/${id}`,
{
headers: {
Authorization: `Bearer ${MOCHI_BOT_SECRET}`,
},
},
)
}

public async getByDiscord(
Expand Down
Loading

0 comments on commit e158994

Please sign in to comment.