Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Reenable connect+tx behavior #1248

Merged
merged 2 commits into from
Jul 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions src/components/TradeWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -868,15 +868,7 @@ const TradeWidget: React.FC = () => {
const cachedSellToken = getToken('symbol', sellToken.symbol, tokens)

// Do not let potential null values through
if (
!buyAmount ||
buyAmount.isZero() ||
!sellAmount ||
sellAmount.isZero() ||
!cachedBuyToken ||
!cachedSellToken ||
!networkId
) {
if (!buyAmount || buyAmount.isZero() || !sellAmount || sellAmount.isZero() || !cachedBuyToken || !cachedSellToken) {
logDebug(
`Preventing null values on submit:
buyAmount:${buyAmount}, sellAmount:${sellAmount},
Expand All @@ -894,7 +886,7 @@ const TradeWidget: React.FC = () => {
sellToken: cachedSellToken,
buyToken: cachedBuyToken,
}
if (isConnected && userAddress) {
if (isConnected && userAddress && networkId) {
await _placeOrder({
...orderParams,
networkId,
Expand Down