Skip to content

Commit f3eb429

Browse files
authored
Merge pull request #849 from 0xsequence/detect-ignored-update
Default to validating configuration updates
2 parents 1197e03 + e6c0f9b commit f3eb429

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/wallet/core/src/wallet.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class Wallet {
135135

136136
async submitUpdate(
137137
envelope: Envelope.Signed<Payload.ConfigUpdate>,
138-
options?: { validateSave?: boolean },
138+
options?: { noValidateSave?: boolean },
139139
): Promise<void> {
140140
const [status, newConfig] = await Promise.all([
141141
this.getStatus(),
@@ -156,7 +156,7 @@ export class Wallet {
156156
const signature = Envelope.encodeSignature(updatedEnvelope)
157157
await this.stateProvider.saveUpdate(this.address, newConfig, signature)
158158

159-
if (options?.validateSave) {
159+
if (!options?.noValidateSave) {
160160
const status = await this.getStatus()
161161
if (Hex.from(Config.hashConfiguration(status.configuration)) !== envelope.payload.imageHash) {
162162
throw new Error('configuration not saved')

0 commit comments

Comments
 (0)