bitshares / beet

Beet is a stand-alone key/identity-manager and signing app for BitShares, heavily influenced by Scatter.
MIT License
27 stars 31 forks source link

Cannot connect to Tusc network #248

Closed grctest closed 1 year ago

grctest commented 1 year ago

Describe the bug

Connecting to a Tusc node fails & subsequently the balances don't load on the main page.

I get the following error:

C:\Users\username\AppData\Local\Programs\Beet Blockchain Companion\resources\app.asar\node_modules\bitsharesjs-ws\lib\ApiInstances.js:2 wss://api.cryptotusc.com Failed to initialize with error Cannot read properties of null (reading 'call')
(anonymous) @ C:\Users\username\AppData\Local\Programs\Beet Blockchain Companion\resources\app.asar\node_modules\bitsharesjs-ws\lib\ApiInstances.js:2 BlockchainAPI.js:97 
The Universal Settlement Coin Failed to connect to wss://api.cryptotusc.com TypeError: Cannot read properties of null (reading 'call') at GrapheneApi.init (C:\Users\username\AppData\Local\Programs\Beet Blockchain Companion\resources\app.asar\node_modules\bitsharesjs-ws\lib\GrapheneApi.js:1:349) at C:\Users\username\AppData\Local\Programs\Beet Blockchain Companion\resources\app.asar\node_modules\bitsharesjs-ws\lib\ApiInstances.js:2:2653 BlockchainAPI.js:66 
wss://api.cryptotusc.com BitShares.js:859 
ensureConnection: wss://api.cryptotusc.com
2BitShares.js:1030 TypeError: Cannot read properties of null (reading 'balances') at BitShares.js:1001:45
BlockchainAPI.js:97 The Universal Settlement Coin Failed to connect to null Timeout
BitShares.js:859 ensureConnection: null

I believe that we need to use the tuscjs and tuscjs-ws libraries to interact with tusc nodes, not simply extend the Bitshares blockchain factory class.

To Reproduce Steps to reproduce the behavior:

Launch Beet, add a tusc account to your beet wallet, switch active account to the tusc account.

Expected behavior

A network connection to the TUSC nodes is established and Tusc balances are shown.

Desktop (please complete the following information):

Additional context

Added more TUSC nodes, however this issue persists.

Edit: I was however able to successfully broadcast a raw-deeplink create_ticket operation, so perhaps we can just overwrite the inherited Bitshares class functions which are causing issue.

Edit: Also unable to upload a local airdrop (multiple transfers in one), because it queries the network for human readable prompt details (like usernames, asset symbols). It currently loops infinitely trying to connect.. hmm

grctest commented 1 year ago

Resolved in #247

grctest commented 1 year ago

Fix merged into develop branch.