revert button text change and remove extra notifications

This commit is contained in:
Tyler Shipe 2021-04-15 11:57:00 -04:00
parent e6909363a7
commit e765ffa3d7
6 changed files with 6 additions and 29 deletions

View File

@ -17,7 +17,7 @@ const Button: FunctionComponent<ButtonProps> = ({
<button
onClick={onClick}
disabled={disabled}
className={`${className} text-th-fgd-3 px-6 py-2 border border-th-fgd-4 bg-th-bkg-2 rounded-md
className={`${className} px-6 py-2 border border-th-fgd-4 bg-th-bkg-2 rounded-md
active:border-mango-yellow hover:bg-th-bkg-3 focus:outline-none disabled:bg-th-bkg-2
disabled:text-th-fgd-4 disabled:cursor-not-allowed`}
{...props}

View File

@ -64,15 +64,11 @@ const DepositModal = ({ isOpen, onClose }) => {
selectedAccount.publicKey,
Number(inputAmount)
)
.then((response: Array<any>) => {
.then((_response: Array<any>) => {
actions.fetchWalletBalances()
actions.fetchMangoGroup()
actions.fetchMarginAccounts()
setSubmitting(false)
notify({
message: `Deposited ${inputAmount} into your account`,
txid: response[1],
})
onClose()
})
.catch((err) => {
@ -96,15 +92,11 @@ const DepositModal = ({ isOpen, onClose }) => {
selectedAccount.publicKey,
Number(inputAmount)
)
.then((response: string) => {
.then((_response: string) => {
actions.fetchWalletBalances()
actions.fetchMangoGroup()
actions.fetchMarginAccounts()
setSubmitting(false)
notify({
message: `Deposited ${inputAmount} into your account`,
txid: `${response}`,
})
onClose()
})
.catch((err) => {

View File

@ -65,11 +65,6 @@ const DepositSrmModal = ({ isOpen, onClose }) => {
actions.fetchMangoSrmAccounts()
actions.fetchWalletBalances()
actions.fetchMangoGroup()
notify({
message: `Deposited ${inputAmount} SRM into your account`,
description: ``,
type: 'info',
})
onClose()
})
.catch((err) => {

View File

@ -16,7 +16,7 @@ const NotificationList = () => {
setMangoStore((state) => {
state.notifications = notifications.slice(1, notifications.length)
})
}, 6000)
}, 5000)
return () => {
clearInterval(id)

View File

@ -63,15 +63,10 @@ const WithdrawModal = ({ isOpen, onClose }) => {
selectedAccount.publicKey,
Number(inputAmount)
)
.then((transSig: string) => {
.then((_transSig: string) => {
setSubmitting(false)
actions.fetchMangoGroup()
actions.fetchMarginAccounts()
notify({
message: `Withdrew ${inputAmount} ${symbol} into your account`,
txid: `${transSig}`,
type: 'info',
})
onClose()
})
.catch((err) => {

View File

@ -54,13 +54,8 @@ const WithdrawModal = ({ isOpen, onClose }) => {
walletSrmAccount.publicKey,
Number(inputAmount)
)
.then((transSig: string) => {
.then((_transSig: string) => {
setSubmitting(false)
notify({
message: `Withdrew ${inputAmount} SRM into your account`,
txid: `${transSig}`,
type: 'info',
})
onClose()
actions.fetchWalletBalances()
actions.fetchMangoSrmAccounts()