polis-sdk's People
Forkers
fourchincookei-money chaoshq btrcode anvuong119 pinkdiamond1 seateam nuvosphere mehiokathy knowenlophoroger lynnrosado tarrellandrick anitawheeler chenzizpolis-sdk's Issues
Polis SDK transaction performance is slow.
Koris uses Polis sdk to complete signature and payment transactions, but the speed is slow. We compared the transaction mode of direct Metamask with that of ether, and found that Polis sdk has a large optimization space. Let's hope Polis does some performance optimization.
Use Polis SDK:
It takes 5.5s to log in via Polis email and use Polis SDK to set up a transaction. It takes 4s to confirm payment.
It takes 6.6s for Metamask login, and 3.9s to set up the transaction using Polis SDK.
Use Metamask directly instead of Polis SDK
It takes 0.3s to log in with Metamask, set up a transaction with ethers, and 0.3s to confirm payment.
Polis SDK is used for multisig transaction, and the transaction speed is slower. See the following figure and the link.
BLS functions have some requirements to be supported by Polis
BLS functions have some requirements to be supported by Polis
- Can distinguish whether each transaction can use BLS service, such as judging by signature
- It can be distinguished by contract. For example, BLS can be used in certain contracts, while Gas can be normally paid in other contracts
- Can distinguish whether different wallets can use BLS
- Provide an interface for querying BLS usage
- Provide an interface for automatically switching BLS on/off
- Provide documentation for the use of BLS-related interfaces
[bug] Async methods don't return after Wallet dialogs cancelled
Example
// expected
export async function requestSomething() {
try {
const result = await polisClient.someContract();
return result; // cancel doesn't resolve promise
} catch (error) {
console.log('Error or Cancelled'); // nor reject
}
}
// actual
window.addEventListener('unhandledrejection', ({ reason }) => console.log(reason));
Possible resolution
Wrap inner promises of Wallet dialogs opening into returned promises.
multi-signature failed error
- Polis sdk :1.1.31
- polis url : https://me.nuvosphere.io/
The same type of multi-signature transaction, the staging environment does not report any error and proceeds normally, however, the production environment has the following error
console message
frontend receive: {"signContent":"0xe130e378e5d8de47a73a486542c698750c07981a2fb252c2fdccda2b70a1504b",
"txType":"SIGN",
"accessToken":"bf251ff6ba7a4590952de7b68ce724d3","walletType":"LOCAL"}
optype: SIGN
login action: undefined
network message:
url: https://me.nuvosphere.io/
status:304
response:
We're sorry but Nuvo doesn't work properly without JavaScript enabled. Please enable it to continue.
However, I have allowed all cookies, here is the cookie information below
The following error message has appeared once while excute transaction
code: -90013
//
code: -90040
[bug] [high] The Nuvo account has been logged out, please log in
The user is newly logged in, but when the user executes a contract transaction, the console reports that the user is not logged in.
- auth: https://oauth.nuvosphere.io
- account: 0x8AD995351113dB302212624e29C1BA4ACA93A3c0
- version: "@metis.io/middleware-client": "1.1.31", "@metis.io/middleware-client": "1.1.33", (we tried the latest version, same problem)
- transaction data
data:
"0x095ea7b3000000000000000000000000334da34622178d4927050f1948a81423bfe59c49000000000000000000000000000000000000000000000000c7b0b8d950198b00"
from: "0x8AD995351113dB302212624e29C1BA4ACA93A3c0"
to: "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000"
1.1 error toast
status: 'ERROR', code: 401, message: 'unauthorized,Wallet connection failure.', data: undefined}
code: 401
data: undefined
message: "unauthorized,Wallet connection failure."
status: "ERROR"
- transaction data
data:
"0xc852d175000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000"
from: "0x8AD995351113dB302212624e29C1BA4ACA93A3c0"
to: "0xBFcd8B8bf1Dd2bFb953E9ad012B79DEb248bDF18"
2.1 error toast
status: 'ERROR', code: 401, message: 'The Nuvo account has been logged out, please log in again', doata:
code: 401
data:""
message: "The Nuvo account has been logged out, please login again"
status: "ERROR"
Data Flow Diagram for Private Key Management
[bug] memo storage service different behavior with same request url
memo storage service, local and test environment with the same request link, local can not get the data, test can get the data
- locationhost: curl "https://polis.metis.io/api/v1/oauth2/get_object_str?data_key=1dada1ef-1674974863-7eac3de5" ^
-H "authority: polis.metis.io" ^
-H "accept: /" ^
-H "accept-language: zh-CN,zh;q=0.9" ^
-H "access-token: 656cf7260faf46bca3071255e86f9d4a" ^
-H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NUb2tlbiI6IjY1NmNmNzI2MGZhZjQ2YmNhMzA3MTI1NWU4NmY5ZDRhIiwicmVmcmVzaFRva2VuIjoiZTE2YjI1NzY2YmJhNDQ5MWFhNjBiNDEwMjg4MWZiODEiLCJleHBpcmVzSW4iOjQzMjAwLCJ1c2VyQWRkcmVzcyI6IjB4MTBlNjJhYmIwOTI1MjlhY2JiYmM3NGE3OGNlOTBhOWZkMGE0OTg5NiIsInVzZXJOYW1lIjoiIiwiZGV2RW1haWwiOiIiLCJjb2RlIjoiOWE5YzJmYWE2Y2QyNDUxZGE5MzA3ZTU4NTczNmY4NzUiLCJpYXQiOjE2NzUwOTc5ODAsImV4cCI6MTcxODI5Nzk4MH0.CCrmkm6TeiHJm6pgQ5BE1Jl_rQtWV9koCDnYUY9Rxpg" ^
-H "origin: http://localhost.localdomain" ^
-H "referer: http://localhost.localdomain/" ^
-H "sec-ch-ua: ^^"Not_A Brand^^";v=^^"99^^", ^^"Google Chrome^^";v=^^"109^^", ^^"Chromium^^";v=^^"109^^"" ^
-H "sec-ch-ua-mobile: ?0" ^
-H "sec-ch-ua-platform: ^^"Windows^^"" ^
-H "sec-fetch-dest: empty" ^
-H "sec-fetch-mode: cors" ^
-H "sec-fetch-site: cross-site" ^
-H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" ^
-H "x-network: 599" ^
--compressed
`{"code":20009,"data":null,"message":"Access token not existed","msg":"Access token not existed","msgTitle":"Something went wrong..."}
`
2. staging curl 'https://polis.metis.io/api/v1/oauth2/get_object_str?data_key=1dada1ef-1674974863-7eac3de5'
-H 'authority: polis.metis.io'
-H 'accept: /'
-H 'accept-language: zh-CN,zh;q=0.9'
-H 'access-token: d4c47a6e073043bdadd75cc77dacbd3e'
-H 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NUb2tlbiI6ImQ0YzQ3YTZlMDczMDQzYmRhZGQ3NWNjNzdkYWNiZDNlIiwicmVmcmVzaFRva2VuIjoiZDVlNGQ5OTdlMTJmNGQwMDhjNjFmNzUzZDA4MDIzZTAiLCJleHBpcmVzSW4iOjQzMjAwLCJ1c2VyQWRkcmVzcyI6IjB4MTBlNjJhYmIwOTI1MjlhY2JiYmM3NGE3OGNlOTBhOWZkMGE0OTg5NiIsInVzZXJOYW1lIjoiIiwiZGV2RW1haWwiOiIiLCJjb2RlIjoiOGI2M2E4NjNjZmNhNDJlYzk4MzZiM2ViNGJmZjg2MmEiLCJpYXQiOjE2NzUwOTU5MTEsImV4cCI6MTcxODI5NTkxMX0.FD-tVJ2nswMDPrsauw-vG0NNBDiX7dAGnQoftpn3cVw'
-H 'cache-control: no-cache'
-H 'origin: https://app.staging.portal.global'
-H 'pragma: no-cache'
-H 'referer: https://app.staging.portal.global/'
-H 'sec-ch-ua: "Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109"'
-H 'sec-ch-ua-mobile: ?0'
-H 'sec-ch-ua-platform: "Windows"'
-H 'sec-fetch-dest: empty'
-H 'sec-fetch-mode: cors'
-H 'sec-fetch-site: cross-site'
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
-H 'x-network: 599'
--compressed
[Bug] Can not click the login button in the Email.
When accessing https://polis-test.metis.io/ through the app, button cannot be clicked in login email.
You can access polis-test directly and click the login email button to log in.
License
Just wondered what license this should fall under as there is none currently defined.
Context: I am working on a port.
Nuvo is choosing Walletconnect when users click Metamask
Nuvo is choosing Walletconnect when users click Metamask. It appears in the mobile end of https://me.nuvosphere.io/ and https://one.nuvosphere.io/ .
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.