Skip to content

Commit

Permalink
Merge pull request #2645 from myxmaster/wallet-add-fix
Browse files Browse the repository at this point in the history
Add wallet: use safe node addition
  • Loading branch information
kaloudis authored Dec 18, 2024
2 parents 8905d6b + 18149cb commit c6ffab9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions views/Settings/WalletConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -471,11 +471,13 @@ export default class WalletConfiguration extends React.Component<
let nodes: Node[];
let originalNode: Node;
if (settings.nodes) {
nodes = settings.nodes;
nodes = [...settings.nodes];
if (index != null) {
originalNode = nodes[index];
nodes[index] = node;
} else {
nodes.push(node);
}
nodes[index != null ? index : settings.nodes.length] = node;
} else {
nodes = [node];
}
Expand Down

0 comments on commit c6ffab9

Please sign in to comment.