Skip to content

Commit

Permalink
Merge pull request #459 from Concordium/BRO-31-errors-on-websites-wit…
Browse files Browse the repository at this point in the history
…h-strict-content-security-policy

[BRO-31] Errors on websites with strict Content Security Policy
  • Loading branch information
Ivan-Mahda committed Apr 4, 2024
2 parents 9a48168 + 88005ec commit b1adbad
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .yarn/patches/@concordium-web-sdk-npm-7.3.2-42c2804ca6.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/package.json b/package.json
index 2653ea6fbf48c58e34e4b8235fc624d2a358b2e0..e4cbc990fa038fb69504ef7cb28eb83c82178c2b 100644
--- a/package.json
+++ b/package.json
@@ -38,6 +38,11 @@
"react-native": null,
"default": "./lib/esm/pub/wasm.js"
},
+ "./types/*": {
+ "types": "./lib/esm/types/*.d.ts",
+ "bun": "./src/types/*.ts",
+ "default": "./lib/esm/types/*.js"
+ },
"./*": {
"types": "./lib/esm/pub/*.d.ts",
"bun": "./src/pub/*.ts",
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,8 @@
"tsc-files": "^1.1.3",
"tsconfig-paths": "^3.14.1",
"typescript": "^5.2.2"
},
"resolutions": {
"@concordium/web-sdk@^7.3.2": "patch:@concordium/web-sdk@npm:^7.3.2#.yarn/patches/@concordium-web-sdk-npm-7.3.2-42c2804ca6.patch"
}
}
6 changes: 3 additions & 3 deletions packages/browser-wallet-api/src/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ import {
UpdateCredentialsPayload,
DataBlob,
AccountTransactionPayload,
Parameter,
getAccountTransactionHandler,
AccountTransactionPayloadJSON,
} from '@concordium/web-sdk/types';
import { empty } from '@concordium/web-sdk/types/Parameter';
import { IdStatement } from '@concordium/web-sdk/id';

export type GtuAmount = { microGtuAmount: bigint };
Expand Down Expand Up @@ -375,13 +375,13 @@ export function sanitizeSendTransactionInput(
case AccountTransactionType.Update:
accountTransactionPayload = {
...(sanitizedPayload as SendTransactionUpdateContractPayload),
message: Parameter.empty(),
message: empty(),
};
break;
case AccountTransactionType.InitContract:
accountTransactionPayload = {
...(sanitizedPayload as SendTransactionInitContractPayload),
param: Parameter.empty(),
param: empty(),
};
break;
default:
Expand Down
24 changes: 24 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2370,6 +2370,30 @@ __metadata:
languageName: node
linkType: hard

"@concordium/web-sdk@patch:@concordium/web-sdk@npm:^7.3.2#.yarn/patches/@concordium-web-sdk-npm-7.3.2-42c2804ca6.patch::locator=concordium-browser-wallet%40workspace%3A.":
version: 7.3.2
resolution: "@concordium/web-sdk@patch:@concordium/web-sdk@npm%3A7.3.2#.yarn/patches/@concordium-web-sdk-npm-7.3.2-42c2804ca6.patch::version=7.3.2&hash=a42437&locator=concordium-browser-wallet%40workspace%3A."
dependencies:
"@concordium/rust-bindings": 3.0.0
"@grpc/grpc-js": ^1.9.4
"@noble/ed25519": ^2.0.0
"@noble/hashes": ^1.3.2
"@protobuf-ts/grpc-transport": ^2.9.1
"@protobuf-ts/grpcweb-transport": ^2.9.1
"@protobuf-ts/runtime-rpc": ^2.8.2
"@scure/bip39": ^1.2.1
"@types/big.js": ^6.2.0
big.js: ^6.2.0
bs58check: ^3.0.1
buffer: ^6.0.3
hash.js: ^1.1.7
iso-3166-1: ^2.1.1
json-bigint: ^1.0.0
uuid: ^8.3.2
checksum: e546226dd5878f555aa589476c4c64ad7a79f141adf93529a646282c448c4680db0cb32ea20fcccbf765fbdbeabc52526a514f9da7af17a9d9da15463d86f91d
languageName: node
linkType: hard

"@craftamap/esbuild-plugin-html@npm:^0.4.0":
version: 0.4.0
resolution: "@craftamap/esbuild-plugin-html@npm:0.4.0"
Expand Down

0 comments on commit b1adbad

Please sign in to comment.