haveno-dex / haveno-ts Goto Github PK
View Code? Open in Web Editor NEWTypeScript library for using Haveno
Home Page: https://haveno-dex.github.io/haveno-ts/classes/HavenoClient.HavenoClient.html
License: Apache License 2.0
TypeScript library for using Haveno
Home Page: https://haveno-dex.github.io/haveno-ts/classes/HavenoClient.HavenoClient.html
License: Apache License 2.0
This issue suggests switching to a logging library instead of in the inbuilt HavenoUtils.log(level, msg)
.
See this and related methods:
haveno-ts/src/utils/HavenoUtils.ts
Line 40 in 1f5ee14
Hi,
Any idea what could be causing the following test to fail? I am running a local test network and have only changed the port for aliceWalletUrl
in the test config. Thank you.
Alice posting offer
Alice done posting offer
Bob taking offer
Bob done taking offer in 6906 ms
Mining to unlock deposit txs
Done mining to unlock deposit txs
FAIL src/HavenoDaemon.test.ts (93.767 s)
โ Can get market prices
ETH is not a valid currency code
at new E (node_modules/grpc-web/index.js:21:1229)
at Y (node_modules/grpc-web/index.js:56:272)
at oc.<anonymous> (node_modules/grpc-web/index.js:55:197)
at Ib (node_modules/grpc-web/index.js:33:182)
at O (node_modules/grpc-web/index.js:32:614)
at yc (node_modules/grpc-web/index.js:46:68)
at oc.Object.<anonymous>.n.W (node_modules/grpc-web/index.js:44:252)
at oc.Object.<anonymous>.n.R (node_modules/grpc-web/index.js:44:231)
at XMLHttpRequest.invokeTheCallbackFunction (node_modules/jsdom/lib/jsdom/living/generated/EventHandlerNonNull.js:18:28)
at XMLHttpRequest.<anonymous> (node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js:35:32)
at innerInvokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:338:25)
at invokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:274:3)
at XMLHttpRequestImpl._dispatch (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:221:9)
at fireAnEvent (node_modules/jsdom/lib/jsdom/living/helpers/events.js:18:36)
at readyStateChange (node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:761:3)
at EventEmitter.<anonymous> (node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:889:5)
at Request.<anonymous> (node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:382:41)
at IncomingMessage.<anonymous> (node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:230:42)
SELLER_SAW_ARRIVED_PAYOUT_TX_PUBLISHED_MSG
PASS src/App.test.tsx
Test Suites: 1 failed, 1 passed, 2 total
Tests: 1 failed, 10 passed, 11 total
Snapshots: 0 total
Time: 94.5 s, estimated 95 s
Ran all test suites.
This issue requests automatically mining to ensure block height >130 in the tests.
This issue requests generating typedocs without private fields, which are preceded by _
.
Are there any Figma or Sketch files for the UI?
I'm a Product Designer and would love to help contribute to the design direction.
Thanks
The Apache 2 license requires us to add the following notice to all source files:
Copyright 2021, Haveno
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
We haven't included it in any file yet, but we should definitely do it in the future (and should be added to already existent files).
This issue requests bundling the UI as an electron application.
The application will need to bundle at least Haveno's daemon, frontend, monerod, and monero-wallet-rpc to be executed in a desktop environment.
This issue requests changes to the recently added Signed Offers view:
signedOffer.toJson()
)I want to post an offer to the Alias daemon, copied and pasted almost the same code from the test file, but keep getting that error on the Alias daemon.
I don't know if there's a misconfigratuon on my daemons. Couldn't understand the error so generic.
Code:
const config = {
direction: "buy", // buy or sell xmr
amount: BigInt("200000000000"), // amount of xmr to trade
assetCode: "eth", // counter asset to trade
price: undefined, // use market price if undefined
paymentAccountId: "50d93331-1640-41eb-b90e-e0352727008f",
priceMargin: 0.0,
minAmount: undefined,
buyerSecurityDeposit: 0.15,
awaitUnlockedBalance: false,
triggerPrice: undefined,
};
client.postOffer(
config.direction,
config.amount,
config.assetCode,
config.paymentAccountId,
config.buyerSecurityDeposit,
config.price,
config.marketPriceMargin,
config.triggerPrice,
config.minAmount
);
Error:
Jun-05 12:21:39.987 [grpc-default-executor-2] INFO b.d.g.i.CallRateMeteringInterceptor: CreateOffer has been called 1 time in the last second, rate limit is 10/second
Jun 05, 2022 12:21:39 PM io.grpc.internal.SerializingExecutor run
SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed@6a9420c8
io.grpc.StatusRuntimeException: UNKNOWN: unexpected error on server
at bisq.daemon.grpc.GrpcExceptionHandler.wrapException(GrpcExceptionHandler.java:99)
at bisq.daemon.grpc.GrpcExceptionHandler.handleException(GrpcExceptionHandler.java:56)
at bisq.daemon.grpc.GrpcOffersService.createOffer(GrpcOffersService.java:178)
at bisq.proto.grpc.OffersGrpc$MethodHandlers.invoke(OffersGrpc.java:569)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:172)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:331)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:814)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Jun-05 12:21:39.989 [grpc-default-executor-2] INFO b.c.offer.CreateOfferService: create and get offer with offerId=031044-795d1c24-f77d-4027-ac64-d9b300d0ebdf-162,
currencyCode=ETH,
direction=BUY,
price=100000000,
useMarketBasedPrice=true,
marketPriceMargin=0.0,
amount=20000000,
minAmount=20000000,
buyerSecurityDeposit=0.15
Jun-05 12:21:39.991 [grpc-default-executor-2] ERROR org.bitcoinj.core.Context: Performing thread fixup: you are accessing bitcoinj via a thread that has not had any context set on it.
Jun-05 12:21:39.992 [grpc-default-executor-2] ERROR org.bitcoinj.core.Context: This error has been corrected for, but doing this makes your app less robust.
Jun-05 12:21:39.992 [grpc-default-executor-2] ERROR org.bitcoinj.core.Context: You should use Context.propagate() or a ContextPropagatingThreadFactory.
Jun-05 12:21:39.992 [grpc-default-executor-2] ERROR org.bitcoinj.core.Context: Please refer to the user guide for more information about this.
Jun-05 12:21:39.992 [grpc-default-executor-2] ERROR org.bitcoinj.core.Context: Thread name is grpc-default-executor-2.
Jun-05 12:21:39.992 [grpc-default-executor-2] INFO org.bitcoinj.wallet.Wallet: Completing send tx with 2 outputs totalling 0.0302 BTC and a fee of 0.00 BTC/vkB
Jun-05 12:21:39.992 [grpc-default-executor-2] INFO b.c.btc.TxFeeEstimationService: We cannot do the fee estimation because there are not enough funds in the wallet. This is expected if the user pays from an external wallet. In that case we use an estimated tx vsize of 175 vbytes.
Jun-05 12:21:39.992 [grpc-default-executor-2] INFO b.c.btc.TxFeeEstimationService: Fee estimation resulted in a tx vsize of 175 vbytes and a tx fee of 1750 Sat.
Jun-05 12:21:39.993 [grpc-default-executor-2] ERROR b.d.grpc.GrpcOffersService: java.lang.NullPointerException: null
at bisq.core.offer.CreateOfferService.createAndGetOffer(CreateOfferService.java:234)
at bisq.core.api.CoreOffersService.createAndPlaceOffer(CoreOffersService.java:239)
at bisq.core.api.CoreApi.createAnPlaceOffer(CoreApi.java:447)
at bisq.daemon.grpc.GrpcOffersService.createOffer(GrpcOffersService.java:151)
at bisq.proto.grpc.OffersGrpc$MethodHandlers.invoke(OffersGrpc.java:569)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:172)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:331)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:814)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
java.lang.NullPointerException: null
at bisq.core.offer.CreateOfferService.createAndGetOffer(CreateOfferService.java:234)
at bisq.core.api.CoreOffersService.createAndPlaceOffer(CoreOffersService.java:239)
at bisq.core.api.CoreApi.createAnPlaceOffer(CoreApi.java:447)
at bisq.daemon.grpc.GrpcOffersService.createOffer(GrpcOffersService.java:151)
at bisq.proto.grpc.OffersGrpc$MethodHandlers.invoke(OffersGrpc.java:569)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:172)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:331)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:814)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
It would be better if .proto
files are not needed to be copied and commited into this repository from the Haveno repository on every change, current instructions:
Copy grpc.proto and pb.proto from Haveno's protobuf definitions to ./config.
Some solutions could be:
../haveno/...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.