Skip to content

Commit

Permalink
Refactor actions configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
behrang committed Oct 9, 2023
1 parent e889feb commit 9631d8d
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,16 +511,11 @@ export class Model {
],
}
const tonBalance = this.tonBalance
void this.tonConnectUI
.sendTransaction(tx, {
skipRedirectToWallet: 'never',
twaReturnUrl: 'https://t.me/HipoFinanceBot',
})
.then(() => {
this.setAmount('')
this.setWaitForTransaction('wait')
return this.checkIfBalanceChanged(tonBalance, 1)
})
void this.tonConnectUI.sendTransaction(tx).then(() => {
this.setAmount('')
this.setWaitForTransaction('wait')
return this.checkIfBalanceChanged(tonBalance, 1)
})
}
}

Expand Down Expand Up @@ -558,6 +553,10 @@ export class Model {
this.tonConnectUI = new TonConnectUI({
manifestUrl: 'https://app.hipo.finance/tonconnect-manifest.json',
buttonRootId,
actionsConfiguration: {
skipRedirectToWallet: 'never',
twaReturnUrl: 'https://t.me/HipoFinanceBot',
},
uiPreferences: {
theme: this.dark ? THEME.DARK : THEME.LIGHT,
colorsSet: {
Expand Down

0 comments on commit 9631d8d

Please sign in to comment.