Skip to content

Commit

Permalink
feat: support aptos standard wallet (#260)
Browse files Browse the repository at this point in the history
* feat: support aptos standard

* feat: optimize aptos provider

* feat: support aptos standard wallet

* chore: optimize default standard wallet

* chore: release version 2.1.19
  • Loading branch information
ByteZhang1024 authored Dec 3, 2024
1 parent cdd9bee commit 7428b11
Show file tree
Hide file tree
Showing 53 changed files with 2,244 additions and 204 deletions.
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-core",
"version": "2.1.18",
"version": "2.1.19",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -29,9 +29,9 @@
"build-version-info": "node ./scripts/buildVersionInfo.js"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-errors": "2.1.18",
"@onekeyfe/cross-inpage-provider-events": "2.1.18",
"@onekeyfe/cross-inpage-provider-types": "2.1.18",
"@onekeyfe/cross-inpage-provider-errors": "2.1.19",
"@onekeyfe/cross-inpage-provider-events": "2.1.19",
"@onekeyfe/cross-inpage-provider-types": "2.1.19",
"events": "^3.3.0",
"lodash-es": "^4.17.21",
"ms": "^2.1.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop/desktop-bridge-injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/desktop-bridge-injected",
"version": "2.1.18",
"version": "2.1.19",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -34,7 +34,7 @@
"electron": "^17.2.0"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.1.18",
"@onekeyfe/cross-inpage-provider-types": "2.1.18"
"@onekeyfe/cross-inpage-provider-core": "2.1.19",
"@onekeyfe/cross-inpage-provider-types": "2.1.19"
}
}
2 changes: 1 addition & 1 deletion packages/empty/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-empty",
"version": "2.1.18",
"version": "2.1.19",
"keywords": [
"cross-inpage-provider"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-errors",
"version": "2.1.18",
"version": "2.1.19",
"keywords": [
"cross-inpage-provider"
],
Expand Down
4 changes: 1 addition & 3 deletions packages/errors/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Web3RpcError, Web3ProviderError } from './classes';
import {
serializeError, getMessageFromCode,
} from './utils';
import { serializeError, getMessageFromCode } from './utils';
import { web3Errors } from './errors';
import { errorCodes } from './error-constants';

Expand Down
2 changes: 1 addition & 1 deletion packages/events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-events",
"version": "2.1.18",
"version": "2.1.19",
"keywords": [
"cross-inpage-provider"
],
Expand Down
10 changes: 8 additions & 2 deletions packages/example/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,19 @@ export const registeredChains: IChainInfo[] = [
},
{
id: uuid.v4(),
name: 'Aptos',
name: 'Aptos Standard',
href: '/aptosStandard',
icon: 'https://uni.onekey-asset.com/static/chain/apt.png',
},
{
id: uuid.v4(),
name: 'Aptos (Legacy)',
href: '/aptos',
icon: 'https://uni.onekey-asset.com/static/chain/apt.png',
},
{
id: uuid.v4(),
name: 'Aptos Martian',
name: 'Aptos Martian (Legacy)',
href: '/aptosMartian',
icon: 'https://uni.onekey-asset.com/static/chain/apt.png',
},
Expand Down
3 changes: 2 additions & 1 deletion packages/example/components/chains/aptos/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default function Example() {
chainId,
};
};

useEffect(() => {
if (!provider) return;

Expand Down Expand Up @@ -209,7 +210,7 @@ export default function Example() {
method: 'POST',
url: 'https://api.mainnet.aptoslabs.com/v1/transactions',
headers: { 'Content-Type': 'application/x.aptos.signed_transaction+bcs' },
data: buffer
data: buffer,
};

const res = await axios.request(options);
Expand Down
14 changes: 14 additions & 0 deletions packages/example/components/chains/aptosStandard/dapps.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const dapps = [
{
name: 'SEAM',
url: 'https://app.seam.money/',
},
{
name: 'Aptos Names',
url: 'https://www.aptosnames.com/',
},
{
name: 'Liquid Swap',
url: 'https://liquidswap.com/#/',
},
];
Loading

0 comments on commit 7428b11

Please sign in to comment.