openbazaar-go icon indicating copy to clipboard operation
openbazaar-go copied to clipboard

ETH - ob/order returns nothing for ETH order

Open jjeffryes opened this issue 5 years ago • 1 comments

I had a notification for a new order on a seller node, and when I tried to load it the client called http://localhost:4102/ob/order/QmTuyFcHSAThFdEr3bL9zBxcbtKS8LMPFqtA8771fKH8Kq

The result was 200 OK with nothing in the response.

I am noticing that the notification currency object has ETH as the code, and a divisibility of 2, which seems incorrect. The same is true for another ETH order notification, and a LTC order notification.

The LTC order opens normally, neither ETH order can be opened. Both are shown as AWAITING PAYMENT in the data returned from /sales.

The notifications json was

{
    "notifications": [
        {
            "notification": {
                "buyerHandle": "",
                "buyerId": "QmWq6n8aZGxc9xMAd6fcZXbkJw4cwyK22C1Um6UXNyVrhf",
                "listingType": "SERVICE",
                "notificationId": "QmYKnZUGQDa5fWz5s6tPgDmMuYHwHoGodJSVnDaMs4NQYn",
                "orderId": "QmT6WeqUA6fTREAhYm4YuC6Y28ZmtLRWKoPXg9TMavESkf",
                "price": {
                    "amount": "151422",
                    "currency": {
                        "code": "LTC",
                        "currencyType": "crypto",
                        "divisibility": 2,
                        "name": "Litecoin"
                    }
                },
                "priceModifier": 0,
                "slug": "test-not-so-low-eth-listing",
                "thumbnail": {
                    "small": "Qmego1XgCsxPwNp8LpiAAbinvHTEhBW9XdZhxfjzggbVLK",
                    "tiny": "QmZvKDyoMuesFhqxZnkSbdWN3MCvRnV9VBr2ECc4sfnCHu"
                },
                "title": "test not so low eth listing 2",
                "type": "order"
            },
            "read": false,
            "timestamp": "2019-12-19T21:24:33Z",
            "type": "order"
        },
        {
            "notification": {
                "buyerHandle": "",
                "buyerId": "QmWq6n8aZGxc9xMAd6fcZXbkJw4cwyK22C1Um6UXNyVrhf",
                "listingType": "SERVICE",
                "notificationId": "QmcERBPXAAmf4vQfjymvJVzDhGTbhsQFhWa9sbsevqG1iZ",
                "orderId": "QmNrcPBQR7zEy1Gyu2QhiXsS8tPMHbCs98Nquvxx6SBQ3w",
                "price": {
                    "amount": "78684984000000",
                    "currency": {
                        "code": "ETH",
                        "currencyType": "crypto",
                        "divisibility": 2,
                        "name": "Ethereum"
                    }
                },
                "priceModifier": 0,
                "slug": "test-price-bug",
                "thumbnail": {
                    "small": "QmRSmK1N6qaLRh2ZNsNRMvYUgHEowBFPNQ7anPpMeLJQ9C",
                    "tiny": "QmR8qj2W484DXK6VYRXsGS4UrG2wFTpjD1jYgfCfh9CPKh"
                },
                "title": "Test Price Bug",
                "type": "order"
            },
            "read": false,
            "timestamp": "2019-12-19T21:15:03Z",
            "type": "order"
        },
        {
            "notification": {
                "buyerHandle": "",
                "buyerId": "QmWq6n8aZGxc9xMAd6fcZXbkJw4cwyK22C1Um6UXNyVrhf",
                "listingType": "SERVICE",
                "notificationId": "QmVYfMgj5MZFt6U9oixp2TJwTrRh77HSyZXAezrtQKbnwt",
                "orderId": "QmTuyFcHSAThFdEr3bL9zBxcbtKS8LMPFqtA8771fKH8Kq",
                "price": {
                    "amount": "78684984000000",
                    "currency": {
                        "code": "ETH",
                        "currencyType": "crypto",
                        "divisibility": 2,
                        "name": "Ethereum"
                    }
                },
                "priceModifier": 0,
                "slug": "test-not-so-low-eth-listing",
                "thumbnail": {
                    "small": "Qmego1XgCsxPwNp8LpiAAbinvHTEhBW9XdZhxfjzggbVLK",
                    "tiny": "QmZvKDyoMuesFhqxZnkSbdWN3MCvRnV9VBr2ECc4sfnCHu"
                },
                "title": "test not so low eth listing 2",
                "type": "order"
            },
            "read": false,
            "timestamp": "2019-12-19T21:13:13Z",
            "type": "order"
        },
        {
            "notification": {
                "buyerHandle": "",
                "buyerId": "QmWq6n8aZGxc9xMAd6fcZXbkJw4cwyK22C1Um6UXNyVrhf",
                "notificationId": "QmUqgwmyAuzfhTieEnJVq7NETPZYfSAmis73xXy9nspyDz",
                "orderId": "QmYWmyxMdeeCLQRPwgDnGc6qpVSFTMrfu7jkrqKavf9VER",
                "thumbnail": {
                    "small": "Qmc3aCdwNBsaUqtYrhgfB1xikezJcDrrvkobyXNiVQMnCQ",
                    "tiny": "QmQJBcXYMzpidTnAa1W1G2p9AY3Jui9KmCaMF5QDQ4uqdB"
                },
                "type": "orderComplete"
            },
            "read": false,
            "timestamp": "2019-12-19T21:09:45Z",
            "type": "orderComplete"
        }
    ],
    "total": 17,
    "unread": 4
}

This was seen on 2af635ab

jjeffryes avatar Dec 19 '19 21:12 jjeffryes

For what it's worth, I get the same result trying to open these orders on the seller side from the transactions screen. They show up normal in the sales call.

The buyer can open the orders without any issues.

jjeffryes avatar Dec 19 '19 21:12 jjeffryes