Git Product home page Git Product logo

bitski-js's Issues

provider.request (tested with "personal_sign") returned promise do not resolve when user close the popup

Describe the bug
provider.request (tested with "personal_sign") returned promise do not resolve when user close the popup

To Reproduce

const signature = await provider.request({
	method: 'personal_sign',
	params: [account, 'hello']
});
// never reach there when user close the popup
console.log({signature})

See repo : https://github.com/bug-reproduction/bitski-request-no-resolved

Expected behavior
I expect request to always resolve after user action, else we cannot act on its rejection

SDK:

  • Version 4.2.0

Bitski Sidechain Support Fix

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.

CORS-Bitski

To Reproduce
Steps to reproduce the behavior:

  1. Connect Bitski to SKALE
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:

  • OS: Mac
  • Browser Chrome
  • Version 74.0.3729.169

SDK:

  • Version Bitski-js 6.0 & 0.7.0-alpha.0

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!

Safari 12 with "Prevent cross-site tracking" enabled does not work with silent login

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:

  1. Go to an app that uses Bitski on a non bitski.com domain in Safari 12 with ITP2.0 enabled
  2. Trigger a silent login (bitski.connect())

Expected behavior
Since the user is logged in, you would expect to receive an access token

0.15.0 gives dependency errors.

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:

  1. yarn add [email protected]
  2. yarn serve or equivalent to start your app
  3. make sure there is no errors
  4. yarn add [email protected]
  5. yarn serve or equivalent to start your app
  6. See error

or 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):

  • OS: [Mac Catalina 10.15.7]
  • Browser [chrome]
  • Version [Version 102.0.5005.115]

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 .

Wallet disconnect on refresh the page

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:

  1. Connect wallet
  2. refresh the page
  3. wallet will disconnect

Expected behavior
Wallet shouldn't be disconnect

Desktop:

  • OS: mac / windows
  • Browser chrome / brave

SDK:

  • Version 0.14.1

can't log in,can not send assets (nft, token)

I don't know about GitHub but I want to ask if Bitski is still running? I've been having issues lately

  • Can't log in, Bitski keeps asking me to enter my email, even though I've done it several times

  • Can't send, an error always appears when I want to send something from Bitski

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.