Code Duplication    Length = 5-5 lines in 2 locations

src/BlocktrailSDK.php 2 locations

@@ 745-749 (lines=5) @@
742
            $backupSeed = isset($options['backup_seed']) ? $options['backup_seed'] : self::randomBits(256);
743
        }
744
745
        if (isset($options['primary_private_key'])) {
746
            $options['primary_private_key'] = BlocktrailSDK::normalizeBIP32Key($options['primary_private_key']);
747
        } else {
748
            $options['primary_private_key'] = BIP32Key::create(HierarchicalKeyFactory::fromEntropy(new Buffer($primarySeed)), "m");
749
        }
750
751
        // create primary public key from the created private key
752
        $options['primary_public_key'] = $options['primary_private_key']->buildKey($walletPath->keyIndexPath()->publicPath());
@@ 883-887 (lines=5) @@
880
            }
881
        }
882
883
        if (isset($options['primary_private_key'])) {
884
            $options['primary_private_key'] = BlocktrailSDK::normalizeBIP32Key($options['primary_private_key']);
885
        } else {
886
            $options['primary_private_key'] = BIP32Key::create(HierarchicalKeyFactory::fromEntropy($primarySeed), "m");
887
        }
888
889
        // create primary public key from the created private key
890
        $options['primary_public_key'] = $options['primary_private_key']->buildKey($walletPath->keyIndexPath()->publicPath());