chore: pairings file related properties removed from the local pairing

The pairings file is transferred along with the `SyncKeypair` message.
This commit is contained in:
Sale Djenic 2023-09-12 21:31:46 +02:00 committed by saledjenic
parent 6894295ac3
commit 3bacb84a02
5 changed files with 15 additions and 20 deletions

View File

@ -18,7 +18,6 @@ type SenderConfig struct {
KeyUID string `json:"keyUID" validate:"required,keyuid"`
Password string `json:"password" validate:"required"`
ChatKey string `json:"chatKey"` // set only in case of a Keycard user, otherwise empty
KeycardPairings string `json:"keycardPairings"`
DB *multiaccounts.Database `json:"-"`
}

View File

@ -46,5 +46,4 @@ type AccountData struct {
Account *multiaccounts.Account `json:"account,omitempty"`
Password string `json:"password,omitempty"`
ChatKey string `json:"chatKey,omitempty"`
KeycardPairings string `json:"keycardPairings,omitempty"`
}

View File

@ -29,7 +29,6 @@ type AccountPayload struct {
multiaccount *multiaccounts.Account
password string
chatKey string
keycardPairings string
//flag if account already exist before sync account
exist bool
}
@ -49,7 +48,6 @@ func (ppm *AccountPayloadMarshaller) MarshalProtobuf() ([]byte, error) {
Keys: ppm.accountKeysToProtobuf(),
Password: ppm.password,
ChatKey: ppm.chatKey,
KeycardPairings: ppm.keycardPairings,
}
if ppm.multiaccount != nil {
lpp.Multiaccount = ppm.multiaccount.ToProtobuf()
@ -87,7 +85,7 @@ func (ppm *AccountPayloadMarshaller) UnmarshalProtobuf(data []byte) error {
}
ppm.password = pb.Password
ppm.chatKey = pb.ChatKey
ppm.keycardPairings = pb.KeycardPairings
return nil
}

View File

@ -112,7 +112,6 @@ func NewAccountPayloadLoader(p *AccountPayload, config *SenderConfig) (*AccountP
ppr.keyUID = config.KeyUID
ppr.password = config.Password
ppr.chatKey = config.ChatKey
ppr.keycardPairings = config.KeycardPairings
ppr.keystorePath = config.KeystorePath
return ppr, nil
}

View File

@ -101,7 +101,7 @@ func NewAccountPayloadReceiver(e *PayloadEncryptor, p *AccountPayload, config *R
return NewBasePayloadReceiver(e, NewPairingPayloadMarshaller(p, l), aps,
func() {
data := AccountData{Account: p.multiaccount, Password: p.password, ChatKey: p.chatKey, KeycardPairings: p.keycardPairings}
data := AccountData{Account: p.multiaccount, Password: p.password, ChatKey: p.chatKey}
signal.SendLocalPairingEvent(Event{Type: EventReceivedAccount, Action: ActionPairingAccount, Data: data})
},
), nil