@arcblock/ux 1.17.20 → 1.17.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
14
14
 
15
15
  var _clsx = _interopRequireDefault(require("clsx"));
16
16
 
17
+ var _buffer = require("buffer");
18
+
17
19
  var _get = _interopRequireDefault(require("lodash/get"));
18
20
 
19
21
  var _pako = _interopRequireDefault(require("pako"));
@@ -67,7 +69,7 @@ function fromBase64(v) {
67
69
  throw new Error('fromBase64 requires input to be a string');
68
70
  }
69
71
 
70
- return Buffer.from(_base64Url.default.unescape(v), 'base64');
72
+ return _buffer.Buffer.from(_base64Url.default.unescape(v), 'base64');
71
73
  } // const isVC = type => {
72
74
  // return String(type).includes('VerifiableCredential');
73
75
  // };
@@ -205,7 +207,7 @@ function NFTDisplay(_ref) {
205
207
  {
206
208
  const buffer = _pako.default.ungzip(fromBase64(content), {});
207
209
 
208
- const svg = Buffer.from(buffer).toString('utf8');
210
+ const svg = _buffer.Buffer.from(buffer).toString('utf8');
209
211
 
210
212
  if (checkSvg && !(0, _isSvg.default)(svg)) {
211
213
  throw new Error("Invalid SVG: ".concat(svg));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "1.17.20",
3
+ "version": "1.17.21",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -53,10 +53,10 @@
53
53
  "react": ">=16.12.0",
54
54
  "react-ga": "^2.7.0"
55
55
  },
56
- "gitHead": "dfa25e33ce1f0204b4a0043dd33f5fe97b187fb8",
56
+ "gitHead": "72ee6788c33de8033ac6fcc884554c9e2bdb0849",
57
57
  "dependencies": {
58
- "@arcblock/icons": "^1.17.20",
59
- "@arcblock/react-hooks": "^1.17.20",
58
+ "@arcblock/icons": "^1.17.21",
59
+ "@arcblock/react-hooks": "^1.17.21",
60
60
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
61
61
  "@fontsource/lato": "^4.5.3",
62
62
  "@material-ui/core": "^4.12.3",
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
  import clsx from 'clsx';
5
+ import { Buffer } from 'buffer';
5
6
  import get from 'lodash/get';
6
7
  import pako from 'pako';
7
8
  import base64 from 'base64-url';