Skip to content
Snippets Groups Projects
Commit 43a3eea8 authored by Jonah Husson's avatar Jonah Husson
Browse files

Fix naming on this side

parent 1087ef9b
No related branches found
No related tags found
3 merge requests!128Project/base32768,!124Update for single DB cipher object,!109Project/haven beta
...@@ -136,8 +136,8 @@ func setGlobals() { ...@@ -136,8 +136,8 @@ func setGlobals() {
js.FuncOf(wasm.GetNotificationReportsForMe)) js.FuncOf(wasm.GetNotificationReportsForMe))
js.Global().Set("GetNoMessageErr", js.FuncOf(wasm.GetNoMessageErr)) js.Global().Set("GetNoMessageErr", js.FuncOf(wasm.GetNoMessageErr))
js.Global().Set("CheckNoMessageErr", js.FuncOf(wasm.CheckNoMessageErr)) js.Global().Set("CheckNoMessageErr", js.FuncOf(wasm.CheckNoMessageErr))
js.Global().Set("NewChannelsDatabaseCipher", js.Global().Set("NewDatabaseCipher",
js.FuncOf(wasm.NewChannelsDatabaseCipher)) js.FuncOf(wasm.NewDatabaseCipher))
js.Global().Set("GetNotificationReportsForMe", js.Global().Set("GetNotificationReportsForMe",
js.FuncOf(wasm.GetNotificationReportsForMe)) js.FuncOf(wasm.GetNotificationReportsForMe))
......
...@@ -370,7 +370,7 @@ func LoadChannelsManager(_ js.Value, args []js.Value) any { ...@@ -370,7 +370,7 @@ func LoadChannelsManager(_ js.Value, args []js.Value) any {
// various events. The entire interface can be nil, but if defined, each // various events. The entire interface can be nil, but if defined, each
// method must be implemented. // method must be implemented.
// - args[6] - ID of [DbCipher] object in tracker (int). Create this // - args[6] - ID of [DbCipher] object in tracker (int). Create this
// object with [NewChannelsDatabaseCipher] and get its id with // object with [NewDatabaseCipher] and get its id with
// [DbCipher.GetID]. // [DbCipher.GetID].
// //
// Returns a promise: // Returns a promise:
...@@ -488,7 +488,7 @@ func newChannelsManagerWithIndexedDb(cmixID int, wasmJsPath string, ...@@ -488,7 +488,7 @@ func newChannelsManagerWithIndexedDb(cmixID int, wasmJsPath string,
// various events. The entire interface can be nil, but if defined, each // various events. The entire interface can be nil, but if defined, each
// method must be implemented. // method must be implemented.
// - args[6] - ID of [DbCipher] object in tracker (int). Create this // - args[6] - ID of [DbCipher] object in tracker (int). Create this
// object with [NewChannelsDatabaseCipher] and get its id with // object with [NewDatabaseCipher] and get its id with
// [DbCipher.GetID]. // [DbCipher.GetID].
// //
// Returns a promise: // Returns a promise:
...@@ -2340,7 +2340,7 @@ func newDbCipherJS(api *bindings.DbCipher) map[string]any { ...@@ -2340,7 +2340,7 @@ func newDbCipherJS(api *bindings.DbCipher) map[string]any {
return DbCipherMap return DbCipherMap
} }
// NewChannelsDatabaseCipher constructs a [DbCipher] object. // NewDatabaseCipher constructs a [DbCipher] object.
// //
// Parameters: // Parameters:
// - args[0] - The tracked [Cmix] object ID (int). // - args[0] - The tracked [Cmix] object ID (int).
...@@ -2353,7 +2353,7 @@ func newDbCipherJS(api *bindings.DbCipher) map[string]any { ...@@ -2353,7 +2353,7 @@ func newDbCipherJS(api *bindings.DbCipher) map[string]any {
// Returns: // Returns:
// - JavaScript representation of the [DbCipher] object. // - JavaScript representation of the [DbCipher] object.
// - Throws an error if creating the cipher fails. // - Throws an error if creating the cipher fails.
func NewChannelsDatabaseCipher(_ js.Value, args []js.Value) any { func NewDatabaseCipher(_ js.Value, args []js.Value) any {
cmixId := args[0].Int() cmixId := args[0].Int()
password := utils.CopyBytesToGo(args[1]) password := utils.CopyBytesToGo(args[1])
plaintTextBlockSize := args[2].Int() plaintTextBlockSize := args[2].Int()
...@@ -2382,7 +2382,7 @@ func (c *DbCipher) GetID(js.Value, []js.Value) any { ...@@ -2382,7 +2382,7 @@ func (c *DbCipher) GetID(js.Value, []js.Value) any {
// //
// Parameters: // Parameters:
// - args[0] - The data to be encrypted (Uint8Array). This must be smaller // - args[0] - The data to be encrypted (Uint8Array). This must be smaller
// than the block size passed into [NewChannelsDatabaseCipher]. If it is // than the block size passed into [NewDatabaseCipher]. If it is
// larger, this will return an error. // larger, this will return an error.
// //
// Returns: // Returns:
......
...@@ -42,7 +42,7 @@ func TestPublicFunctions(t *testing.T) { ...@@ -42,7 +42,7 @@ func TestPublicFunctions(t *testing.T) {
"NewEventModel": {}, "NewEventModel": {},
"NewChannelsManagerGoEventModel": {}, "NewChannelsManagerGoEventModel": {},
"LoadChannelsManagerGoEventModel": {}, "LoadChannelsManagerGoEventModel": {},
"GetChannelDbCipherTrackerFromID": {}, "GetDbCipherTrackerFromID": {},
// Version functions were renamed to differentiate between WASM and // Version functions were renamed to differentiate between WASM and
// client versions // client versions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment