ethoswallet / ethos-connect Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Hello:
I found there is web browser extension wallet: Ethos Sui Wallet, and I want to know the following:
Ethos connect version: 0.0.123
On vanilla create-react-app, the ethos disconnect wallet doesn't seem to disconnect the wallet, it stays connected.
I am trying to use the AddressWidget inside my App. I want to exlude the WalletExplorer button so I did this:
<ethos.components.AddressWidget excludeButtons={[AddressWidgetButtons.WalletExplorer]} />
The problem with this is that:
ERROR in ./src/client/layouts/NavBar.tsx 40:0-85 Module not found: Error: Package path ./dist/enums/AddressWidgetButtons is not exported from package .../node_modules/ethos-connect (see exports field in .../node_modules/ethos-connect/package.json)
So the type need to be used is not properly exported. I tried to use the value directly "wallet_explorer" but the component expects type of AddressWidgetButtons
, so I need to use ts-ignore.
I am raising this issue for future resolution.
I get an error on the front end using the ethos interaction contract, but the same parameters are fine in the sui client.
I succeeded in the method with only String parameters, but this multi-parameter method failed.
I suspect it's a problem with the vector type.
Error:
Uncaught (in promise) Error: Transaction failed with the following error. Error executing a move call: Error: RPC Error: invalid type: map, expected a string at line 1 column 0 with args {"arguments":["[email protected]","james king","bavatar","2000-01-01","male","Basketball","["nba"]","USA","King"],"function":"register","gasBudget":10000,"module":"user","packageObjectId":{"contractAddress":"0xc867a645b70c7741121ef1c4f713a8efd6b96481"},"typeArguments":[]}
Contract:
public entry fun register(
email: String,
name: String,
avatar: vector<u8>,
birthday: String,
gender: String,
biography: String,
interests: vector<String>,
location: String,
memo: String,
ctx: &mut TxContext,
)
----- Certificate ----
Transaction Hash: 2EqZEDQCwjh4YnBg8W/d+O31e2Np6gk9eDlRXbD8Z6U=
Transaction Signature: AA==@Mg/OFIUWiSBKSjT6SXuQI4yDfXFm49RPlwJscEOpfVjV5T80tpd/rM0PsOfeamtaXqANPxCYiWCEn7o7lFjiBw==@UqPyfxDF4mqhd2SCOsx6sN8gX3XXRnnJ6Z0bLmOxsWU=
Signed Authorities Bitmap: RoaringBitmap<[0, 1, 3]>
Transaction Kind : Call
Package ID : 0xc867a645b70c7741121ef1c4f713a8efd6b96481
Module : user
Function : register
Arguments : ["[email protected]", "james king", "bavatar", "2000-01-01", "male", "Basketball", ["nba"], "USA", "King"]
Type Arguments : []
----- Transaction Effects ----
Status : Success
Created Objects:
- ID: 0x96def174a8a64eaeb8a941a9e7ad79d5f0d9f09f , Owner: Account Address ( 0x01f97c6894c897f4e23d551bdf7faf29fef505ec )
Mutated Objects:
- ID: 0x0ca37c1f455cf54dfea412bfdf01f3ca90ad8f8b , Owner: Account Address ( 0x01f97c6894c897f4e23d551bdf7faf29fef505ec )
Front End:
data: {
packageObjectId: contractAddress,
module: 'user',
function: 'register',
typeArguments: [],
arguments: [
'[email protected]',
'james king',
'bavatar',//'[]', '[""]', '[90,10]' Replacing them with these parameters still gives an error
'2000-01-01',
'male',
'Basketball',
'["nba"]',
'USA',
'King'
],
gasBudget: 10000,
}
any plans on updating dependencies?
$ npm install ethos-connect --save
[…]
npm WARN deprecated @mysten/[email protected]: Wallet adapters have been deprecated in favor of the Wallet Standard. Please upgrade to the latest Wallet Kit versions.
npm WARN deprecated @mysten/[email protected]: Wallet adapters have been deprecated in favor of the Wallet Standard. Please upgrade to the latest Wallet Kit versions.
npm WARN deprecated @mysten/[email protected]: Wallet adapters have been deprecated in favor of the Wallet Standard. Please upgrade to the latest Wallet Kit versions.
npm WARN deprecated @mysten/[email protected]: Wallet adapters have been deprecated in favor of the Wallet Standard. Please upgrade to the latest Wallet Kit versions.
[…]
$ node -v
v18.17.1
$ npm -v
10.1.0
$ sw_vers
ProductName: macOS
ProductVersion: 13.4.1
ProductVersionExtra: (c)
BuildVersion: 22F770820d
With Ethos Wallet version: 0.0.123
On vanilla create-react-app, rejecting the connection request for Sui Wallet results in constant requests to connect again.
I was able to connect to the Sui wallet however after I refreshed the page it show the following errors
Unhandled Runtime Error
Error: Error fetching owned object: Error: RPC Error: Method not found for address
Call Stack
JsonRpcProvider.eval
node_modules/@mysten/sui.js/dist/index.mjs (3554:0)
Generator.throw
<anonymous>
rejected
node_modules/@mysten/sui.js/dist/index.mjs (52:0)
Below is my nextjs page
export default function HomePage() {
const { status, wallet } = ethos.useWallet();
return (
<EthosConnectProvider
dappName='Joed'
connectMessage='Your connect message goes here!'
ethosConfiguration={{
hideEmailSignIn: false, // defaults to false,
}}
>
<Layout>
<Seo />
<main>
<section className='bg-white'>
<div>
Status: {status}, address {wallet?.address}
</div>
<SignInButton> Connect Wallet </SignInButton>
</section>
</main>
</Layout>
</EthosConnectProvider>
);
}
My node modules
"ethos-connect": "^0.0.106",
"next": "^13.2.4",
"react": "^18.2.0",
When instantiating the provider in a vanilla create-react-app, when the EthosConnectProvider is passed without a ethosConfiguration, the component enters an infinite re-render loop.
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.