Code Duplication    Length = 5-5 lines in 2 locations

src/BlocktrailSDK.php 2 locations

@@ 735-739 (lines=5) @@
732
            $backupSeed = isset($options['backup_seed']) ? $options['backup_seed'] : self::randomBits(256);
733
        }
734
735
        if (isset($options['primary_private_key'])) {
736
            $options['primary_private_key'] = BlocktrailSDK::normalizeBIP32Key($options['primary_private_key']);
737
        } else {
738
            $options['primary_private_key'] = BIP32Key::create(HierarchicalKeyFactory::fromEntropy(new Buffer($primarySeed)), "m");
739
        }
740
741
        // create primary public key from the created private key
742
        $options['primary_public_key'] = $options['primary_private_key']->buildKey($walletPath->keyIndexPath()->publicPath());
@@ 873-877 (lines=5) @@
870
            }
871
        }
872
873
        if (isset($options['primary_private_key'])) {
874
            $options['primary_private_key'] = BlocktrailSDK::normalizeBIP32Key($options['primary_private_key']);
875
        } else {
876
            $options['primary_private_key'] = BIP32Key::create(HierarchicalKeyFactory::fromEntropy($primarySeed), "m");
877
        }
878
879
        // create primary public key from the created private key
880
        $options['primary_public_key'] = $options['primary_private_key']->buildKey($walletPath->keyIndexPath()->publicPath());