bitskico / bitski-js Goto Github PK
View Code? Open in Web Editor NEWBitski JavaScript SDK
Home Page: https://docs.bitski.com
License: MIT License
Bitski JavaScript SDK
Home Page: https://docs.bitski.com
License: MIT License
Describe the bug
Module not found: Error: Can't resolve '@bitski/provider-engine' in '***/node_modules/bitski-provider/dist'
Module not found: Error: Can't resolve 'promise-to-callback' in '***/node_modules/bitski/dist/esm/subproviders'
Module not found: Error: Can't resolve 'cross-fetch' in '***/node_modules/bitski/dist/esm/subproviders'
To Reproduce
Steps to reproduce the behavior:
yarn add [email protected]
yarn serve
or equivalent to start your appyarn add [email protected]
yarn serve
or equivalent to start your appor to be more cautious
7. rm -r node_module && rm yarn-lock
8. yarn install
9. yarn serve
or equivalent to start your app
10. See error
Expected behavior
[email protected]
does not give any of these dependency errors
Desktop (please complete the following information):
Additional context
This seems to be introduced in #229
I have NOT cloned the repo and installed lerna
, assuming installing libraries from npm should not require users to go through such extra steps .
Disconnecting wallet on page reload
When we try to refresh the page when bitski wallet connected it gets disconnected.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Wallet shouldn't be disconnect
Desktop:
SDK:
Describe the bug
When attemping to connect Bitski to a SKALE elastic sidechain, I receive a CORS error due to request headers that should not be sent to SKALE.
To Reproduce
Steps to reproduce the behavior:
const bitski = new Bitski('<YOUR-CLIENT-ID>', '<YOUR-REDIRECT-URL>');
const network = {
rpcUrl: '<YOUR-SKALE-ENDPOINT>',
chainId: 1
}
const provider = bitski.getProvider({ network });
let web3 = new Web3(provider);
Expected behavior
A potential fix will be to remove the headers when sending requests to networks that contain a rpcUrl
within the bitski-browser-engine
at line 41.
bitski-browser-engine.ts (line 41)
Change
const defaultHeaders = {
'X-API-KEY': this.clientId,
'X-CLIENT-ID': this.clientId,
'X-CLIENT-VERSION': this.sdkVersion,
};
To
const defaultHeaders = {};
if("rpcUrl" in network === false) {
defaultHeaders = {
'X-API-KEY': this.clientId,
'X-CLIENT-ID': this.clientId,
'X-CLIENT-VERSION': this.sdkVersion,
};
}
Desktop:
SDK:
Additional context
I work at SKALE Labs, and am working on verifying support between SKALE and API based wallets. I really love what you are building at Bitski, and I look forward to following the progress!
Describe the bug
The new setting "Prevent cross-site tracking" which enables ITP 2.0 in Safari 12 blocks third-party cookies from being accessible in iframes. Popups and the redirect flow are not affected.
To Reproduce
Steps to reproduce the behavior:
bitski.connect()
)Expected behavior
Since the user is logged in, you would expect to receive an access token
Seems we're not catching errors here (a few lines below you can see it rethrows the error). Not sure what the best way to handle it would be. Could just catch and ignore which would solve the warnings, or somehow pass that error back to web3.
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.