Skip to content

Commit

Permalink
Updated namings
Browse files Browse the repository at this point in the history
  • Loading branch information
KyrylR committed Jun 24, 2024
1 parent cb7172e commit e03e9cc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "qtum-snap-monorepo",
"name": "qtum-wallet-monorepo",
"private": true,
"description": "",
"homepage": "https://github.com/qtumproject/qtum-extension-wallet",
Expand Down
20 changes: 10 additions & 10 deletions packages/connector/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# QtumSnap Connector
# Qtum Wallet Connector

QtumSnap connector is used to install snap and exposes methods for calling snap on dApps and other applications.
Qtum Wallet connector is used to install snap and exposes methods for calling snap on dApps and other applications.

## Usage

Expand All @@ -19,30 +19,30 @@ yarn add @qtumproject/qtum-wallet-connector
```typescript
import { QtumWallet } from '@qtumproject/qtum-wallet-connector';

export const qtumSnap = new QtumWallet();
export const qtumWallet = new QtumWallet();
```

### Establish connection

```typescript
import { qtumSnap } from '@/path/to/qtumSnap';
import { qtumWallet } from '@/path/to/qtumWallet';

const init = async () => {
await qtumSnap.enable();
await qtumWallet.enable();
};
```

### check if snap or metamask is installed
### Check if snap or metamask is installed

```typescript
import { isMetamaskInstalled } from '@qtumproject/qtum-wallet-connector';

import { qtumSnap } from '@/path/to/qtumSnap';
import { qtumWallet } from '@/path/to/qtumWallet';

const checkSnapStatus = async () => {
return {
isMetamaskInstalled: await isMetamaskInstalled(),
isSnapInstalled: await qtumSnap.isInstalled(),
isSnapInstalled: await qtumWallet.isInstalled(),
};
};
```
Expand All @@ -63,12 +63,12 @@ const provider = new ethers.providers.Web3Provider(connector);
import { providers } from 'ethers';
import { useMemo } from 'react';

import { qtumSnap } from '@/path/to/qtumSnap';
import { qtumWallet } from '@/path/to/qtumWallet';

export const useProvider = () => {
const provider = useMemo(() => {
try {
return new providers.Web3Provider(qtumSnap as providers.ExternalProvider);
return new providers.Web3Provider(qtumWallet as providers.ExternalProvider);
} catch (error) {
return undefined;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@qtumproject/qtum-wallet",
"version": "0.1.0-rc.0",
"description": "Qtum Snap is a MetaMask Snap that plays the role of the RPC proxy that accepts requests to the MetaMask and forwards them to the Qtum network with the Qtum ethers adapter.",
"description": "Qtum Wallet is a MetaMask Snap that plays the role of the RPC proxy that accepts requests to the MetaMask and forwards them to the Qtum network with the Qtum ethers adapter.",
"repository": {
"type": "git",
"url": "https://github.com/qtumproject/qtum-extension-wallet.git"
Expand Down
4 changes: 2 additions & 2 deletions packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.1.0-rc.0",
"description": "Securely store and manage all of your identity credentials. Use them across chains with ZK-protected privacy guarantees.",
"proposedName": "QtumSnap",
"description": "Qtum Wallet is a MetaMask Snap that plays the role of the RPC proxy that accepts requests to the MetaMask and forwards them to the Qtum network with the Qtum ethers adapter.",
"proposedName": "Qtum Wallet",
"repository": {
"type": "git",
"url": "https://github.com/qtumproject/qtum-extension-wallet.git"
Expand Down

0 comments on commit e03e9cc

Please sign in to comment.