Skip to content

Commit

Permalink
fix(vault): bug that prevents user from transferring funds in vaults
Browse files Browse the repository at this point in the history
Co-authored-by: Anh Nguyen <[email protected]>
  • Loading branch information
2 people authored and tuanddd committed Sep 8, 2023
1 parent 9c438cc commit 5f043fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
5 changes: 4 additions & 1 deletion src/commands/vault/transfer/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ export async function runTransferTreasurer({
return
}

const userProfileId = await getProfileIdByDiscord(user?.id ?? "")
let userProfileId = ""
if (user) {
userProfileId = await getProfileIdByDiscord(user.id)
}
const requesterProfileId = await getProfileIdByDiscord(i.user.id)

const vaultName = i.options.getString("name", true)
Expand Down
25 changes: 8 additions & 17 deletions src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,6 @@ export interface ModelOffchainTipBotToken {
updated_at?: string
}

export interface ModelProductBotCommand {
code?: string
created_at?: string
description?: string
discord_command?: string
id?: number
scope?: number
telegram_command?: string
updated_at?: string
}

export interface ModelProductMetadataEmojis {
code?: string
discord_id?: string
Expand Down Expand Up @@ -794,7 +783,6 @@ export interface RequestTransferV2Request {
recipients?: string[]
sender?: string
token?: string
transfer_type?: "transfer" | "airdrop"
}

export interface RequestUnlinkBinance {
Expand Down Expand Up @@ -1914,6 +1902,10 @@ export interface ResponseNftWatchlistSuggestResponse {

export interface ResponseOffchainTipBotTransferToken {
amount_each?: number
/**
* SenderID string `json:"sender_id"`
* Recipients string `json:"recipient_id"`
*/
id?: string
total_amount?: number
tx_id?: number
Expand All @@ -1939,10 +1931,6 @@ export interface ResponsePaginationResponse {
total?: number
}

export interface ResponseProductBotCommand {
data?: ModelProductBotCommand[]
}

export interface ResponseProfileAirdropCampaignResponse {
data?: ModelProfileAirdropCampaign
}
Expand Down Expand Up @@ -2114,7 +2102,10 @@ export interface ResponseTopUser {

export interface ResponseTransferTokenV2Data {
amount_each?: number
external_id?: string
/**
* SenderID string `json:"sender_id"`
* Recipients string `json:"recipient_id"`
*/
id?: string
total_amount?: number
tx_id?: number
Expand Down

0 comments on commit 5f043fe

Please sign in to comment.