ggez-banking-sdk 0.2.25 → 0.2.26

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.
@@ -1,3 +1,4 @@
1
+ import { TransactionType } from "../../constants/enum";
1
2
  const FillTransactionData = (key, value) => {
2
3
  const transactionData = {
3
4
  result: null,
@@ -49,13 +50,15 @@ const FillCreateTransactionData = (data) => {
49
50
  id: data.accountId,
50
51
  },
51
52
  },
52
- blockchain: {
53
- transaction_hash: data?.blockchainHash,
54
- network_id: data?.blockchainNetworkId,
55
- account_info: {
56
- id: data?.blockchainAccountId,
57
- },
58
- },
53
+ blockchain: data.type === TransactionType.System_Blockchain_Load
54
+ ? {
55
+ transaction_hash: data?.blockchainHash,
56
+ network_id: data?.blockchainNetworkId,
57
+ account_info: {
58
+ id: data?.blockchainAccountId,
59
+ },
60
+ }
61
+ : null,
59
62
  validate: data.validate,
60
63
  bank_account: {
61
64
  id: data?.bankId,
@@ -113,5 +113,6 @@ declare const regexPatterns: {
113
113
  WSURl: RegExp;
114
114
  DecimalNumber: RegExp;
115
115
  GoogleAuthenticationCodePattern: RegExp;
116
+ TransactionHashRegexPattern: RegExp;
116
117
  };
117
118
  export { regexPatterns };
@@ -111,5 +111,6 @@ const regexPatterns = {
111
111
  WSURl: /^wss:\/\/([a-zA-Z0-9\-_]+\.)+[a-zA-Z]{2,6}(:[0-9]{1,5})?(\/[a-zA-Z0-9\-_\/]*)?$/,
112
112
  DecimalNumber: /^\d+(\.\d{1,6})?$/,
113
113
  GoogleAuthenticationCodePattern: /^[0-9]{6}$/,
114
+ TransactionHashRegexPattern: /^(?:0x[a-fA-F0-9]{64}|[a-fA-F0-9]{64}|[1-9A-HJ-NP-Za-km-z]{87,88}|[A-Za-z0-9+/_-]{43,88}=?)$/,
114
115
  };
115
116
  export { regexPatterns };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",