Skip to content

Commit

Permalink
import Token
Browse files Browse the repository at this point in the history
  • Loading branch information
10xSebastian committed Sep 11, 2023
1 parent 9e12633 commit 90bc439
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dist/esm/index.evm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { request } from '@depay/web3-client-evm';
import { Token } from '@depay/web3-tokens-evm';
import Token from '@depay/web3-tokens-evm';
import React, { useState, useEffect } from 'react';
import Blockchains from '@depay/web3-blockchains';

Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PublicKey, Buffer } from '@depay/solana-web3.js';
import { request } from '@depay/web3-client';
import { Token } from '@depay/web3-tokens';
import Token from '@depay/web3-tokens';
import React, { useState, useEffect } from 'react';
import Blockchains from '@depay/web3-blockchains';

Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.solana.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PublicKey, Buffer } from '@depay/solana-web3.js';
import { request } from '@depay/web3-client-solana';
import { Token } from '@depay/web3-tokens-solana';
import Token from '@depay/web3-tokens-solana';
import React, { useState, useEffect } from 'react';
import Blockchains from '@depay/web3-blockchains';

Expand Down
7 changes: 4 additions & 3 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@depay/web3-client-evm'), require('@depay/web3-tokens-evm'), require('react'), require('@depay/web3-blockchains')) :
typeof define === 'function' && define.amd ? define(['exports', '@depay/web3-client-evm', '@depay/web3-tokens-evm', 'react', '@depay/web3-blockchains'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReactTokenImage = {}, global.Web3Client, global.Web3Tokens, global.React, global.Web3Blockchains));
}(this, (function (exports, web3ClientEvm, web3TokensEvm, React, Blockchains) { 'use strict';
}(this, (function (exports, web3ClientEvm, Token, React, Blockchains) { 'use strict';

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var Token__default = /*#__PURE__*/_interopDefaultLegacy(Token);
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains);

Expand Down Expand Up @@ -71,7 +72,7 @@
try {

let mintPublicKey = new PublicKey(address);
let metaDataPublicKey = new PublicKey(web3TokensEvm.Token.solana.METADATA_ACCOUNT);
let metaDataPublicKey = new PublicKey(Token__default['default'].solana.METADATA_ACCOUNT);

let seed = [
Buffer.from('metadata'),
Expand All @@ -84,7 +85,7 @@
let metaData = await web3ClientEvm.request({
blockchain,
address: tokenMetaDataPublicKey.toString(),
api: web3TokensEvm.Token.solana.METADATA_LAYOUT,
api: Token__default['default'].solana.METADATA_LAYOUT,
cache: 86400000, // 1 day
});

Expand Down
7 changes: 4 additions & 3 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@depay/solana-web3.js'), require('@depay/web3-client'), require('@depay/web3-tokens'), require('react'), require('@depay/web3-blockchains')) :
typeof define === 'function' && define.amd ? define(['exports', '@depay/solana-web3.js', '@depay/web3-client', '@depay/web3-tokens', 'react', '@depay/web3-blockchains'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReactTokenImage = {}, global.SolanaWeb3js, global.Web3Client, global.Web3Tokens, global.React, global.Web3Blockchains));
}(this, (function (exports, solanaWeb3_js, web3Client, web3Tokens, React, Blockchains) { 'use strict';
}(this, (function (exports, solanaWeb3_js, web3Client, Token, React, Blockchains) { 'use strict';

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var Token__default = /*#__PURE__*/_interopDefaultLegacy(Token);
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains);

Expand Down Expand Up @@ -71,7 +72,7 @@
try {

let mintPublicKey = new solanaWeb3_js.PublicKey(address);
let metaDataPublicKey = new solanaWeb3_js.PublicKey(web3Tokens.Token.solana.METADATA_ACCOUNT);
let metaDataPublicKey = new solanaWeb3_js.PublicKey(Token__default['default'].solana.METADATA_ACCOUNT);

let seed = [
solanaWeb3_js.Buffer.from('metadata'),
Expand All @@ -84,7 +85,7 @@
let metaData = await web3Client.request({
blockchain,
address: tokenMetaDataPublicKey.toString(),
api: web3Tokens.Token.solana.METADATA_LAYOUT,
api: Token__default['default'].solana.METADATA_LAYOUT,
cache: 86400000, // 1 day
});

Expand Down
7 changes: 4 additions & 3 deletions dist/umd/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@depay/solana-web3.js'), require('@depay/web3-client-solana'), require('@depay/web3-tokens-solana'), require('react'), require('@depay/web3-blockchains')) :
typeof define === 'function' && define.amd ? define(['exports', '@depay/solana-web3.js', '@depay/web3-client-solana', '@depay/web3-tokens-solana', 'react', '@depay/web3-blockchains'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReactTokenImage = {}, global.SolanaWeb3js, global.Web3Client, global.Web3Tokens, global.React, global.Web3Blockchains));
}(this, (function (exports, solanaWeb3_js, web3ClientSolana, web3TokensSolana, React, Blockchains) { 'use strict';
}(this, (function (exports, solanaWeb3_js, web3ClientSolana, Token, React, Blockchains) { 'use strict';

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var Token__default = /*#__PURE__*/_interopDefaultLegacy(Token);
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains);

Expand Down Expand Up @@ -71,7 +72,7 @@
try {

let mintPublicKey = new solanaWeb3_js.PublicKey(address);
let metaDataPublicKey = new solanaWeb3_js.PublicKey(web3TokensSolana.Token.solana.METADATA_ACCOUNT);
let metaDataPublicKey = new solanaWeb3_js.PublicKey(Token__default['default'].solana.METADATA_ACCOUNT);

let seed = [
solanaWeb3_js.Buffer.from('metadata'),
Expand All @@ -84,7 +85,7 @@
let metaData = await web3ClientSolana.request({
blockchain,
address: tokenMetaDataPublicKey.toString(),
api: web3TokensSolana.Token.solana.METADATA_LAYOUT,
api: Token__default['default'].solana.METADATA_LAYOUT,
cache: 86400000, // 1 day
});

Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/*#if _EVM
import { request } from '@depay/web3-client-evm'
import { Token } from '@depay/web3-tokens-evm'
import Token from '@depay/web3-tokens-evm'
/*#elif _SOLANA
import { Buffer, PublicKey } from '@depay/solana-web3.js'
import { request } from '@depay/web3-client-solana'
import { Token } from '@depay/web3-tokens-solana'
import Token from '@depay/web3-tokens-solana'
//#else */

import { Buffer, PublicKey } from '@depay/solana-web3.js'
import { request } from '@depay/web3-client'
import { Token } from '@depay/web3-tokens'
import Token from '@depay/web3-tokens'

//#endif

Expand Down

0 comments on commit 90bc439

Please sign in to comment.