Skip to content

Commit

Permalink
Fix provider issue in BuyOrder.tsx and SellOrder.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Walodja1987 committed Jun 4, 2024
1 parent 9d12c7b commit 1ff37e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/diva-app/src/component/Trade/Orders/BuyOrder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ const BuyOrder = (props: {
}

useEffect(() => {
if (userAddress != null) {
if (provider && userAddress) {
getMakerTokenAllowanceAndBalance(userAddress).then(async (val) => {
// Use values returned from getMakerTokenAllowanceAndBalance to initialize variables
setCollateralBalance(val.balance)
Expand Down
2 changes: 1 addition & 1 deletion packages/diva-app/src/component/Trade/Orders/SellOrder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ const SellOrder = (props: {
}

useEffect(() => {
if (userAddress != null) {
if (provider && userAddress) {
getMakerTokenAllowanceAndBalance(userAddress).then(async (val) => {
// Use values returned from getMakerTokenAllowanceAndBalance to initialize variables
setOptionBalance(val.balance)
Expand Down

0 comments on commit 1ff37e0

Please sign in to comment.